Hi;
I've this code:
for t=0:10 stream=[2 3 4 5 4 5 6 7]; U=stream(randi(length(stream))); y=[1 2 3 4; … 2 3 4 5 ; … 1 2 3 4; … 1 2 3 4; … 3 4 5 6]; z=U.*y; z=bsxfun(@plus,z,z) t=0:10; end
I would like have a Ztot = z(when t=1)+ z(when t=2)… z(when t=10). I want a single array made from the sums of all the matrices that arise at each step.
Thanks… Edoardo
Best Answer