Filter löschen
Filter löschen

how to convert cell in matrix

1 Ansicht (letzte 30 Tage)
Sara
Sara am 6 Sep. 2018
Kommentiert: Sara am 12 Sep. 2018
I have a 1*4 cell array and all members have the same size "{ [100*1] , [100*1], [100*1] ,[100*1]}" . I want to convert cell array in a way that get a matrix of (4*100). I mean each member of the cell array would be a column of my matrix.

Akzeptierte Antwort

OCDER
OCDER am 6 Sep. 2018
A = repmat({rand(100, 1)}, 1, 4); %your 1x4 cell containin 100x1 matrix per each cell
B = [A{:}] %your 100x4 matrix

Weitere Antworten (1)

Geoff Hayes
Geoff Hayes am 6 Sep. 2018
Sara - cell2mat might be what you are looking for.

Kategorien

Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by