Mean computaion in matlab
1 次查看(过去 30 天)
显示 更早的评论
How to comput mean of 3D mat file having lon, lat ,value !
0 个评论
采纳的回答
Constantino Carlos Reyes-Aldasoro
2021-7-22
If your data is in a matrix of dimensions [samples x 3], e.g.
data=[lon1 lat1 value1;
lon2 lat2 value2;
lon3 lat3 value3;
lon4 lat4 value4;
...
]
then you simply need to do
mean(data) and that will calculate the mean of each column.
Hope this solves your question. If yes, please accept the answer, if not, let me know.
0 个评论
更多回答(2 个)
James Tursa
2021-7-22
You can specify the dimension to use with the mean( ) function. E.g., maybe this is the computation you want:
data = your 3D matrix
ave = mean(data,3); % mean of 3rd dimension
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!