matrix arrangement problem for loop

2 vues (au cours des 30 derniers jours)
tsai kai shung
tsai kai shung le 30 Oct 2017
Commenté : tsai kai shung le 30 Oct 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];

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!