recursive function's summation in MATLAB

Posted by lucky on Stack Overflow See other posts from Stack Overflow or by lucky
Published on 2010-05-16T22:56:21Z Indexed on 2010/05/16 23:00 UTC
Read the original article Hit count: 267

Filed under:
|

B=[1 1 1 1 1 1....1] % vector of length N elements

Xk= sin(2*pi/16)

i need to find function alpha(l,k) which is having two variables l and k and a condition given that alpha(l,0)=alpha(l,-1)=alpha(l,-2)......=alpha(l,-(N-1))=0 i.e no matter what value of l ,alpha = 0 for past values

A= input('no of iterations'); % no. of iterations user want N=input('N values of alpha:') alpha1=[];

for k=0:A-1

l=0:N-1 % need 10 separate alpha values for every k, which goes from 0 to A-1

alpha(l,k)= Xk + summation( B(j)*alpha(l,k-j)) % as summation goes from j=1 to N

alpha1=[alpha1 alpha]

end;

could anyone please help me to solve this recursive function, i am new to matlab.

alpha

© Stack Overflow or respective owner

Related posts about matlab

Related posts about homework