Hi,
I have a variable V(a,b,c) where
a=1:50b=ac=1:100
Now I would like to make a loop and plot the following:
sum_a(V(a,a+r,:))
May I ask you to help me with this loop and the 2D plot?
I have tried with this:
M=50;V_prev=zeros(a,b,c);V=V_prev; for ik=1:M V(ik,:,:)=V+V(ik,:,:); for r=50-1:-1:0 V(ik,ik+r,:)=sum(V(ik,ik+r,:)); end end
Unfortunately it doesn't work.
Thanks in advance for your reply.
Best Answer