Easily working with numerical data in a cell array
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Kirby Runyon
am 1 Sep. 2015
Kommentiert: Star Strider
am 1 Sep. 2015
I have a bunch of n x 2 matrices stored in a 1 x 37 cell array. The first column of each matrix is an x-position and the 2nd column is a y-position. How do I a) plot all the data as y vs. x; and b) how do I concatenate this into one long n x 2 matrix? My horrible workaround has been to use
celldisp
and then to copy and paste this into Excel!
0 Kommentare
Akzeptierte Antwort
Thorsten
am 1 Sep. 2015
A{1} = rand(12,2);
A{2} = rand(10,2);
b)
B = cell2mat(A');
a)
plot(B(:,1), B(:,2))
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Cell 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!