Filter löschen
Filter löschen

QUestion regarding Number of elements in a cell

1 Ansicht (letzte 30 Tage)
John
John am 3 Dez. 2013
Beantwortet: Walter Roberson am 3 Dez. 2013
I've a cell array
X{1,1} = [1,2,3,4];
X{1,2} = [1,3];
X{2,1} = [1,3,4];
X{2,2} = [1,4,5];
I wanted to find the number of elements in each cell. my output should be ,for example, number of elements in X{1,1} = 4 and so on. Is there a function that I could use?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 3 Dez. 2013
cellfun(@numel, X)

Weitere Antworten (0)

Kategorien

Mehr zu Data Types finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by