Revision as of 10:03, 1 July 2009 by Zhang205 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

function y = myconv(x,h)

Lx=length(x); Lh=length(h);

X=[x zeros(1,Lh-1)];

H=[h zeros(1,Lx-1)];

n = Lx + Lh -1; % Length of the output signal

y=zeros(1,n); % initial y

for i=1:n

   for(j=1:i)
       y(i)=y(i)+X(j)*H(i-j+1);
   end

end


stem(y) % make it like a discrete signal

Alumni Liaison

Followed her dream after having raised her family.

Ruth Enoch, PhD Mathematics