mean of elements of a matrix
1 次查看(过去 30 天)
显示 更早的评论
I have a matrix A. I want to take an average of all elements of A. Please advise.
0 个评论
采纳的回答
更多回答(2 个)
Image Analyst
2023-1-20
theAverage = mean(A, 'all')
% or
theAverage = mean2(A) % In the Image Processing Toolbox.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!