Creating new arrays from the elements of multiple arrays
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Adam Parry
am 16 Okt. 2013
Kommentiert: Adam Parry
am 16 Okt. 2013
I'm not sure if the way I am doing this is the most efficient but what I have is multiple arrays, A{i}, created using data imported to matlab, each of which are of the form
1 2 3
4 5 3
2 8 3
9 2 7
8 5 7
7 8 7
Basically I would like to sort these arrays and create new ones which would be in the form
1 3 2
9 7 2
4 3 5
8 7 5
2 3 8
7 7 8
Does this make sense? Essentially it would allow me to plot the first row with respect to the third row at constant second row (this is confusing...)
Can anyone help me make sense of what I am doing or suggest an alternative method?
Thank You
0 Kommentare
Akzeptierte Antwort
Andrei Bobrov
am 16 Okt. 2013
Bearbeitet: Andrei Bobrov
am 16 Okt. 2013
B = cat(3,A{:});
out = permute(B,[3 2 1]);
and
out1 = num2cell(out,[1 2]);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!