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

조회 수: 3 (최근 30일)
H Carlos
H Carlos 2021년 8월 19일
댓글: H Carlos 2021년 8월 19일
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