How do I convert a 3 x3 cell to a 3 x 1 cell?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Brad
am 17 Aug. 2015
Bearbeitet: Azzi Abdelmalek
am 17 Aug. 2015
I have a 3 x 3 cell matrix that looks like this;
1 1 0
1 0 1
0 0 1
I'm searching for a way (if possible) to convert this to a 3 x 1 cell that looks like this;
[1,1,0]
[1,0,1]
[0,0,1]
Does MATLAB have a built in functiont that accomplishes this?
Thank you.
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 17 Aug. 2015
Bearbeitet: Azzi Abdelmalek
am 17 Aug. 2015
a=[1 1 0;1 0 1;0 0 1]
b=num2cell(a,2)
If a is a cell array
a={1 1 0;1 0 1;0 0 1}
b=num2cell(cell2mat(a),2)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Type Conversion 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!