0% found this document useful (0 votes)
63 views6 pages

Lab 1 Basic Signals

Basic signals

Uploaded by

adityadhital7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views6 pages

Lab 1 Basic Signals

Basic signals

Uploaded by

adityadhital7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Source Code & Outputs

[Link] impulse signal


t=-5:0.001:5;
y=(t==0)
subplot(1,2,1)
plot(t,y)
xlabel('time domain(t)');
ylabel('amplitude');
title('continuous unit impulse signal');
axis([-3 3 -1 2])
grid on

n=-[Link];
y=(n==0)
subplot(1,2,2)
stem(n,y)
xlabel('==>time domain(t)');
ylabel('==>amplitude');
title('discrete unit impulse signal');
axis([-3 3 -1 2])
grid on

[Link] step
t=-5:0.001:5;
y=(t>=0)
subplot(2,1,1)
plot(t,y)
xlabel('time domain(t)');
ylabel('amplitude u(t)');
title('continuous unit step signal');
axis([-3 3 -1 2])
grid on

n=-[Link];
y=(n>=0)
subplot(2,1,2)
stem(n,y)
xlabel('==>time domain(n)');
ylabel('==>amplitude u(n)');
title('discrete unit step signal');
axis([-6 6 -1 2])
grid on

[Link] ramp
t=-5:0.001:5;
y=t.*(t>=0)
subplot(2,1,1)
plot(t,y)
xlabel('time domain(t)');
ylabel('amplitude');
title('continuous unit ramp signal');
axis([-7 7 -1 6])
grid on
n=-[Link];
y=n.*(n>=0)
subplot(2,1,2)
stem(n,y)
xlabel('==>time domain(t)');
ylabel('==>amplitude');
title('discrete unit ramp signal');
axis([-7 7 -1 6])
grid on

[Link] signal
t=-5:0.001:5;
y=+1.*(t>0);
subplot(2,1,1)
plot(t,y)
hold on
y=-1.*(t<0)
plot(t,y)
xlabel('time domain(t)');
ylabel('amplitude');
title('signum signal');
axis([-6 6 -2 2])
grid on

n=-[Link];
y=+1.*(n>0);
subplot(2,1,2)
stem(n,y)
hold on
y=-1.*(n<0)
stem(n,y)
xlabel('time domain(t)');
ylabel('amplitude');
title('signum signal');
axis([-6 6 -2 2])
grid on

5 sine wave
w=(pi/2);
t=-5:0.001:5
x=sin(w*t)
subplot(2,1,1)
plot(t,x)
xlabel('time domain');
ylabel('amplitude');
title('continuous sinusoidal signal');
axis([-10 10 -2 2])
grid on

w=(pi/10);
n=-[Link]
x=sin(w*n)
subplot(2,1,2)
stem(n,x)
xlabel('time domain');
ylabel('amplitude');
title('sinusoidal signal');
axis([-10 10 -2 2])
grid on
[Link] signal
a=0.5;
t=-5:0.001:5
x=exp(a*t)
subplot(2,2,1)
plot(t,x)
xlabel('===>time domain(t)');
ylabel('===>amplitude');
title('exponential signal');
grid on

a=0.5;
n=-[Link]
x=exp(a*n)
subplot(2,2,2)
stem(n,x)
xlabel('===>time domain(t)');
ylabel('===>amplitude');
title('exponential signal');
grid on

a=-0.5;
t=-5:0.001:5
x=exp(a*t)
subplot(2,2,3)
plot(t,x)
xlabel('===>time domain(t)');
ylabel('===>amplitude');
title('exponential signal');
grid on

a=-0.5;
n=-[Link]
x=exp(a*n)
subplot(2,2,4)
stem(n,x)
xlabel('===>time domain(t)');
ylabel('===>amplitude');
title('exponential signal');
grid on

You might also like