p=3; L=1000; x=rand(1,L); r=zeros(p,1); W=ones(p,L); V=zeros(L,1); for k=1:L r=[x(k);r(1:p-1)]; V(k) = W.'*r; end
error In an assignment A(I) = B, the number of elements in B and I must be the same.
| I want to find the value of V(k) which is the result of transpose W times r but I'm getting the above error. would you please tell me how to fix the code. |
Best Answer