matlab length of each element in cell array

前端 未结 2 1196
灰色年华
灰色年华 2020-12-20 16:15
a={\'a\',\'aa\',\'aaa\',\'aaaa\'}
length(a)
  4
size(a)
  1 4

How can I get the length of each element in the cell array with a single comm

2条回答
  •  北海茫月
    2020-12-20 16:23

    arrayfun - Apply function to each element of array check documentation: http://www.mathworks.com/help/techdoc/ref/arrayfun.html

提交回复
热议问题