How to take mean of integers value?
2 次查看(过去 30 天)
显示 更早的评论
I want to take mean of 5 column. How can I ? please find the attachment of the data.
2 个评论
SALAH ALRABEEI
2021-6-12
Use mean(A,dir) where A is ur matrix and dir is the direction in which u r averaging. dir takes 1,or2,or3 etc values
采纳的回答
Scott MacKenzie
2021-6-12
编辑:Scott MacKenzie
2021-6-12
You need to use braces because your data are in a table:
mean(LSinclination{:,5})
If it's just the integer values you want the mean of (as suggested in your question title), then
intLogical = mod(LSinclination{:,5},1)==0
mean(LSinclination{intLogical,5});
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Function Creation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!