Answer by Azzi Abdelmalek
on 18 Nov 2013

t=-10:10; %vector time

x=rand(1,numel(t)); % Your signal

xmt=[fliplr(x(t>=0)) fliplr(x(t<0))]

xe=0.5*(xmt+x)

xo=0.5*(x-xmt)

subplot(3,1,1);

plot(t,x);

title('Your signal x')

subplot(3,1,2);

plot(t,xe);

title('Even part')

subplot(3,1,3);

plot(t,xo);

title('Odd part')

suhaib Dawood
on 23 Sep 2016

If you have heaviside function what to do to find the even and odd portion ?

JUGAL SUGGALA 17BEC0423
on 30 Aug 2018

Sign in to comment.

Answer by Sean de Wolski
on 18 Nov 2013

signal = rand(1000,1);

even = signal(2:2:end);

odd = signal(1:2:end);

Like this?

Answer by Sandeep Maurya
on 7 Sep 2017

Sign in to comment.

Answer by Christian Stoddard
on 10 Feb 2019

myeven = @(x) (1/2)*(myfun(x)+myfun(-x));

myodd = @(x) (1/2)*(myfun(x)-myfun(-x));

Sign in to comment.

Answer by sushma medabalimi
on 29 Aug 2019

tmin=-10; dt=0.1; tmax=10;

t=tmin:dt:tmax;

a = 2;

% Generate exponential signal

x1 = exp(a*t);

%Perform time reversal operation

x2 = exp(-a*t);

%Condition to check odd signal

if(x2==x1)

disp('The given signal is even signal')

else if (x2==(-x1))

disp('The given signal is an odd signal')

else

disp('The given signal is neither even nor odd signal')

end

end

Sign in to comment.

Answer by Kshitiz
on 4 Oct 2019 at 3:56

clc;

close all;

clear all;

prompt = 'Enter the values';

x=input(prompt)

x_dash=flip(-x);

t1=0:1:length(x)-1;

t1_dash=flip(-t1);

for i=1:length(x)

odd(i)=x_dash(i)/2;

end

for i=2:length(x)

odd(i+length(x))=x(i)/2;

end

odd(length(x))=0;

for i=1:length(x)

t(i)=t1_dash(i);

end

for i=1:length(x)

t(i+length(x))=t1(i);

end

length(t)

length(odd)

subplot(311)

stem(t,odd)

xlim([-10 10])

title('ODD SIGNAL');

x_dash=flip(x);

t1=0:1:length(x)-1;

t1_dash=flip(-t1);

for i=1:length(x)

odd(i)=x_dash(i)/2;

end

for i=1:length(x)

odd(length(x))=x(i)/2;

end

odd(length(x)+1)=x(1);

for i=1:length(x)

t(i)=t1_dash(i);

end

for i=1:length(x)

t(length(x))=t1(i);

end

length(t)

length(odd)

length(odd)

subplot(312)

stem(t,odd)

xlim([-10 10])

title('EVEN SIGNAL');

subplot(313)

stem(t1,x)

xlim([-10 10])

title('ACTUAL SIGNAL')

Sign in to comment.

Opportunities for recent engineering grads.

Apply Today
## 0 Comments

Sign in to comment.