Posts

Showing posts from December, 2020

Generation of Damped Sinusoidal, Unit Step, Ramp and Impulse Signal

Image
Generation of Damped Sinusoidal, Unit Step, Ramp and Impulse Signal Generation of  Damped Sinusoidal signal Matlab Code:   a=0.5; f=1; w=2*pi*f; for (t=0:0.01:10)     y=exp(-a*t)*sin(w*t);     plot(t,y, 'r' );     hold on ; end ; xlabel( 'time in sec' ); ylabel( 'amplitude in cm' ); title( 'Damped Sinusoidal Signal' ); grid on ; Damped Sinusoidal Signal Generation of Unit step function    Matlab Code:   t=0:0.1:10; t0=2; y=0*(t<t0)+1*(t>=t0); plot(t,y); xlabel( 'Time' ); ylabel( 'Amplitude' ); title( 'Unit Step Function' ); grid on ; Unit Step Function Generation of Ramp wave            Matlab Code:   m=1; t=0:0.01:10; y=m*t; plot(t,y); xlabel( 'Time' ); ylabel( 'Amplitude' ); title( 'Ramp Signal' ); grid on ; Ramp Signal Generation of Impulse wave Matlab Code:   t=0:0.01:10; t0=3; for (t=t0)     y=1; end ; if (t...