Basic Signal Operations Using Matlab
Basic Signal Operations Using Matlab
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')
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