0% found this document useful (0 votes)
44 views

Basic Signal Operations Using Matlab

Uploaded by

Tes 2000
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)
44 views

Basic Signal Operations Using Matlab

Uploaded by

Tes 2000
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
You are on page 1/ 1

t=0:0.

001:5;
x= t;
subplot(3,1,1)
plot(t,x)
title('Original signal');
xlabel('Time period');
ylabel('Amplitude');

disp('1.Time Folding')
disp('2.Time Shifting')
disp('3.Display Even Component')
disp('4.Display Odd Component')

f= input('Enter the operation to be performed:')


switch f
case 1
x_reverse = fliplr(x);
subplot(3,1,2)
plot(t,x_reverse)
title('Folded signal');
xlabel('Time period');
ylabel('Amplitude');

case 2
subplot(3,1,2)
n=input('Enter the no. of seconds:')
plot(t+n,x)
title('Time shifted signal');
xlabel('Time period');
ylabel('Amplitude');

case 3
x_reverse = fliplr(x);
xe=0.5*(x+x_reverse);
subplot(3,1,2)
plot(t,xe);
title('Even part of the signal');
xlabel('Time period');
ylabel('Amplitude');

case 4
x_reverse = fliplr(x);
xo=0.5*(x-x_reverse);
subplot(3,1,2)
plot(t,xo);
title('Odd part of the signal');
xlabel('Time period');
ylabel('Amplitude');
end

You might also like