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

2 ビュー (過去 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
  1 件のコメント
H Carlos
H Carlos 2021 年 8 月 19 日
Worked! Thank you so much.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by