matrix arrangement problem for loop

2 Ansichten (letzte 30 Tage)
tsai kai shung
tsai kai shung am 30 Okt. 2017
Kommentiert: tsai kai shung am 30 Okt. 2017
hey guide i want arrangement the matrix like: a = [1 2 3 4 5 6 7 8.........unknown number] but matrix is A multiple of four
how to use for loop to become
a = [1 2 3 4; 5 6 7 8; 9 ....; .....unknown number];

Akzeptierte Antwort

Roger Stafford
Roger Stafford am 30 Okt. 2017
a = reshape(a,4,[]).';

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices 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!