0% found this document useful (0 votes)
80 views1 page

All All: %%even Add Odd Parts of Signals

This document contains code to generate two signals, add and subtract them to obtain the even and odd parts, and plot the original and separated signals on a 2x2 subplot grid.

Uploaded by

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

All All: %%even Add Odd Parts of Signals

This document contains code to generate two signals, add and subtract them to obtain the even and odd parts, and plot the original and separated signals on a 2x2 subplot grid.

Uploaded by

ranjith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

%%even add odd parts of signals

clc;
close all;
clear all;
t=0:0.001:10;
x1=sin(t)+cos(t);
subplot(2,2,1);
plot(t,x1);
grid;
xlabel('time');
ylabel('amplitude');
title('first signal');
x2=sin(-t)+cos(-t);
subplot(2,2,2);
plot(t,x2);
grid;
xlabel('time');
ylabel('amplitude');
title('second signal');
xe=1/2*(x1+x2);
subplot(2,2,3);
plot(t,xe);
grid;
xlabel('time');
ylabel('amplitude');
title('even part of the signal');
xo=1/2*(x1-x2);
subplot(2,2,4);
plot(t,xo);
grid;
xlabel('time');
ylabel('amplitude');
title('odd part of the signal');

You might also like