How can I sum a matrix in a For Loop?
1 view (last 30 days)
Show older comments
Hi;
I've a model done with matlab in wich I've several for loop, every step of every cycle creates a matrix. I want to sum every created matrix.
thanks
0 Comments
Accepted Answer
Sean de Wolski
on 2 Nov 2012
doc sum
?
2 Comments
Sean de Wolski
on 2 Nov 2012
sum(C(1:30))
If you evaluate at the MATLAB command line:
>>doc sum
It will tell you all about summing.
More Answers (1)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!