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?
2 views (last 30 days)
Show older comments
Sara Renmiu
on 16 May 2020
Answered: Mathias Andersen
on 16 May 2020
This
mean(a(:))
has been suggested but it has not worked for me.
0 Comments
Accepted Answer
Mathias Andersen
on 16 May 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')
0 Comments
More Answers (0)
See Also
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!