Find number of rows of each array in a cell

1 次查看(过去 30 天)
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 个评论
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 CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by