Filter löschen
Filter löschen

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 Ansicht (letzte 30 Tage)
This
mean(a(:))
has been suggested but it has not worked for me.

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Shifting and Sorting Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by