Vector Manipulation into a matrix?
Ältere Kommentare anzeigen
I have a vector, A, of dimensions 21-by-1. How would I be able to manipulate this matrix such that:
A = [a;b;c;d;e;f;g;h;i;...]
Becomes a 3-by-7 matrix, B:
B = [c,b,a;f,e,d;i,h,g,...]
Any help would be much appreciated! Thanks.
Akzeptierte Antwort
Weitere Antworten (1)
Fangjun Jiang
am 13 Mär. 2020
A=(1:21)';
temp1=reshape(A,3,[]);
temp2=temp1';
B=fliplr(temp2)
1 Kommentar
Daniel Tanner
am 13 Mär. 2020
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!