Cell rows/columns size

3 次查看(过去 30 天)
Hi,
I have a m by n cell in which some rows has less than 10 strings and the remaining elements are empty ([ ]). I now want to determine how many strings are there in each rows. If this cell was an array I could use "nonzeros(A(i,:))" to determine this but I don't know how to do this for a cell. Please help me fix this problem.
Thanks.

采纳的回答

Fangjun Jiang
Fangjun Jiang 2020-5-20
c={'12',[],'adjk';'jkjf','j;',[]}
b=cellfun(@isempty,c)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Structures 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by