finding the a average of matrix any better way
古いコメントを表示
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..
採用された回答
その他の回答 (1 件)
Thomas
2012 年 5 月 16 日
Don't know if this is better..
a=[2 4 5;3 2 1;2 3 8;4 1 9];
average=mean(mean(a))
カテゴリ
ヘルプ センター および File Exchange で Matrix Indexing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!