finding the a average of matrix any better way
Show older comments
a=[2 4 5;3 2 1;2 3 8;4 1 9];
average=sum(sum(a))/numel(a)
Any better way to do this..
Accepted Answer
More Answers (1)
Thomas
on 16 May 2012
Don't know if this is better..
a=[2 4 5;3 2 1;2 3 8;4 1 9];
average=mean(mean(a))
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!