フィルターのクリア

Find number of rows of each array in a cell

1 回表示 (過去 30 日間)
Asim Ismail
Asim Ismail 2017 年 5 月 18 日
編集済み: Guillaume 2017 年 5 月 18 日
I have a cell of size 4x4, and each array in this cell is a matrix having size nx2. How can I find n(number of rows) of each matrix, any idea?

採用された回答

Guillaume
Guillaume 2017 年 5 月 18 日
cellfun(@(c) size(c, 1), yourcellarray)
  3 件のコメント
Stephen23
Stephen23 2017 年 5 月 18 日
Faster:
cellfun('size', yourcellarray, 1)
Guillaume
Guillaume 2017 年 5 月 18 日
編集済み: Guillaume 2017 年 5 月 18 日
Faster but deprecated for several years now. Also will not work correctly if the cell array contains objects of a class that overloads the size method (admittedly something very rare).

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by