how to find out number of rows in particular matrix of the cell?
2 ビュー (過去 30 日間)
古いコメントを表示
Suppose i have 1*2 cell as shown below
A B
[1 2] [1 2 ; 3 4]
how can i find out number of rows in each cell..in these example they are 1 and rsply. for A and B.
0 件のコメント
採用された回答
その他の回答 (1 件)
Azzi Abdelmalek
2013 年 7 月 15 日
out=cellfun(@(x) size(x,1),a)
4 件のコメント
Azzi Abdelmalek
2013 年 7 月 15 日
Sorry, my connection is very bad, I did not see your answer, I will remove mine
Evan
2013 年 7 月 15 日
編集済み: Evan
2013 年 7 月 15 日
No worries, I often have the same problem. I just made that comment in order to clarify the difference between our answers (and to give you guys a chance to correct me in case I was mistaken :P). It wouldn't hurt to leave it up in order to have an example of how to use anonymous function handles with cellfun, especially since the list of available string arguments is pretty short and you oftentimes have to resort to function handles. I just wanted to clarify that, when available, the string arguments were best.
参考
カテゴリ
Help Center および File Exchange で Cell Arrays についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!