Find minimum values of 2nd column of matrices in a cell

3 次查看(过去 30 天)
I have a cell with 8 matrices, and I would like to find the minimum value of only the second column of each matrix (find 8 minimum values).
So far I have:
cellfun(@min,c,"UniformOutput",false)
But this selects the minimum value of the first column of each, instead of the second column.

采纳的回答

Simon Chan
Simon Chan 2021-8-19
cellfun(@(x) min(x(:,2)),A) % where A is your 8x1 cell

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

产品


版本

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by