signals & system
signals & system
clc;
clear all;
close all;
t=0: 0.001: 5/50;
A=2;
f=50;
T=1/f;
x=A*sin(2*3.14*f*t);
plot(t,x);
title('Generation of continuous sinusoidal signals 22EER087');
xlabel('Time in seconds');
ylabel('Amplitude in volts');
Cosine Signal:-
clc;
clear all;
close all;
t=0: 0.001: 5/50;
A=2;
f=50;
T=1/f;
x=A*cos(2*3.14*f*t);
plot(t,x);
title('Generation of continuous cosine signals
22EER087');
xlabel('Time in seconds');
ylabel('Amplitude in volts');
Ramp Signal:-
clc;
clear all;
close all;
t=0: 0.001: 10
A=2;
x=A*t;
plot(t,x);
title('Generation of ramp signals 22EER087');
xlabel('Time in seconds');
ylabel('Amplitude in volts');
Unit Step Signal:-
clc;
clear all;
close all;
t=0:1:10;
A=2;
x=ones(1,11);
plot(t,x);
title('Generation of unit step signals
22EER087');
xlabel('Time in seconds');
ylabel('Amplitude in volts');
Unit one sided Parabolic Signal:-
clc;
clear all;
close all;
t=0:1:30;
A=2;
x=A*t.^2;
plot(t,x);
title('Generation of unit one sided parabolic signals
22EER087');
xlabel('Time in seconds');
ylabel('Amplitude in volts');
Unit two sided parabolic signal:-
clc;
clear all;
close all;
t=-30:1:30;
A=2;
x=A*t.^2;
plot(t,x);
title('Generation of unit two sided parabolic signals
22EER087');
xlabel('Time in seconds');
ylabel('Amplitude in volts');
EXPONENTIAL SIGNAL:
i) a<0:clear all;
close all;
c=input('Enter value of c:')
a=input('Enter value of a:')
t=0:0.1:50;
y=c*exp(a*t)
plot(t,y)
xlabel('TIME in seconds')
ylabel('AMPLITUDE in volts')
title('Continuous exponential Signal with a and c are
real(a<0)-22EER087')
ii) a>0:
clc;
clear all;
close all;
c=input('Enter value of c:')
a=input('Enter value of a:')
t=0:0.1:50;
y=c*exp(a*t)
plot(t,y)
xlabel('TIME in seconds')
ylabel('AMPLITUDE in volts')
title('Continuous exponential Signal with a and c are real(a>0)-
22EER087')
iii) a=0:
clc;
clear all;
close all;
c=input('Enter value of c:')
a=input('Enter value of a:')
t=0:0.1:50;
y=c*exp(a*t)
plot(t,y)
xlabel('TIME in seconds')
ylabel('AMPLITUDE in volts')
title('Continuous exponential Signal with a and c are
real(a=0)-22EER087')
06)IMPLUSE SIGNAL :
clc;
clear all;
close all;
t=-20:0.01:20
del_t=t==0
plot(t,del_t)
title('Continuous Impulse Signal 22EER087')
xlabel('TIME in seconds')
ylabel('Amplitude in volts')
RESULT: