Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

%even and odd patrs of signals and sequences

clc;
clear all;
close all;
%even and odd patrs of signals
t=-10:0.01:10;
j=sqrt(-1);
z=cos(t)+j*sin(t);
subplot(2,2,1);
plot(t,real(z));
xlabel('time');
ylabel('amplitude');
title('Real part of complex signal');
subplot(2,2,2);
plot(t,imag(z));
xlabel('time');
ylabel('amplitude');
title('Imag part of complex signal');

%even and odd patrs of sequences


z1=[0,2+1j*4,-3+1j*2,5-1j*1,-2-1j*4,-1j*3,0];
n=-3:3;
subplot(2,2,3);
stem(n,real(z1));
xlabel('n');
ylabel('amplitude');
title('real part of seq ');
subplot(2,2,4);
stem(n,imag(z1));
xlabel('n');
ylabel('amplitude');
title('imaginary part of seq ');

You might also like