Filter löschen
Filter löschen

extract number of columns in each row

1 Ansicht (letzte 30 Tage)
ar
ar am 3 Okt. 2022
Bearbeitet: Stephen23 am 3 Okt. 2022
  1. I have the following variable with a list of rows - each containing a [1 x n] matrix. Is there a way to extract the n for each row into a separate variable?

Akzeptierte Antwort

Stephen23
Stephen23 am 3 Okt. 2022
Bearbeitet: Stephen23 am 3 Okt. 2022
Where C is your cell array:
V = cellfun(@numel,C)
V = cellfun('size',C,2)

Weitere Antworten (0)

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by