Generation of Damped Sinusoidal, Unit Step, Ramp and Impulse Signal
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;
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;
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;
Generation of Impulse wave
Matlab Code:
t=0:0.01:10;
t0=3;
for(t=t0)
y=1;
end;
if(t>t0)
y=0;
end;
if(t<t0)
y=0;
end;
stem(t,y);
xlabel('Time');
ylabel('Amplitude');
title('Impulse Signal');
grid on;
If you are an Electrical Engineering Student, then I would recommend you to have these books mentioned below for better understanding of concepts.
Circuit theory by Abhijit Chakrabarti: https://amzn.to/3gnrht3
Basic Electrical Engineering by S Chand: https://amzn.to/3gnrht3




Comments
Post a Comment