Calculating mean in array
2 次查看(过去 30 天)
显示 更早的评论
采纳的回答
Adam
2015-9-18
cellfun( @(x) mean(x(:,2)), myArray )
should work, assuming you mean you have a cell array which is the only type of array that would fit your description.
2 个评论
Adam
2015-9-18
'myArray' should be replaced by whatever you have named your 69x1 array.
'x' is just a placeholder. Usually I name my variables more verbosely, but in cellfun I often just use 'x' as a placeholder rather than giving it a longer name. You can call it what you like so long as you use the same name in both places 'x' appears.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!