Finding the mean of my entire data
1 次查看(过去 30 天)
显示 更早的评论
How do I find the entire mean of all my data points
1 个评论
Luna
2018-11-28
Could you please be more specific about what you needed and how is your data structure?
回答(3 个)
Luna
2018-11-28
编辑:Luna
2018-11-28
You can not put file name into mean function.
Please put variable name which exist in your workspace after loading your data.
mean(variableName)
You haven't included your workspace in that screenshot so I don't see anything.
for example create a 5x5 matrix A and take mean value. Mean works with columns.
A = magic(5)
mean(A)
0 个评论
Star Strider
2018-11-28
If you have R2018b, use the 'all' argument:
Avg = mean(MyMatrix, 'all')
otherwise, convert it to a column vector and take the mean of that:
Avg = mean(MyMatrix(:))
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!