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

3 visualizaciones (últimos 30 días)
H Carlos
H Carlos el 19 de Ag. de 2021
Comentada: H Carlos el 19 de Ag. de 2021
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.

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by