Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

convolution in matlab...

Status
Not open for further replies.

myasir786

Newbie level 6
Joined
Mar 10, 2011
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,391
n=-10:10;

x=((1/3).^(-n)).*((-n-1)>=0);
h=((n-1)>=0);

subplot(3,1,1);
stem(n,x);
title('x');

subplot(3,1,2);
stem(n,h);
title('h');

c=conv(h,x);
m=0:length(c)-1;
subplot(3,1,3);
stem(m,c);
title('conv');



what is the problem with this program it is showing first two graph correctly but it is not showing 3rd one...
 

h is a logical variable and conv need numeric args.

Write : h=double(((n-1)>=0)); (double or single)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top