Hi, I'm new to matlab and wanted to find the mean of all the values in my matrix/data set and was wondering how I would do this?

1 次查看(过去 30 天)
This
mean(a(:))
has been suggested but it has not worked for me.

采纳的回答

Mathias Andersen
Mathias Andersen 2020-5-16
See the documentation for the mean command here
So if you want the mean of an entire matrix write the following
mean(a,'all')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by