Reshaping a matrix using a loop or any function inbuilt.
Ältere Kommentare anzeigen
Hello, Does anyone know how to reshape a m*n matrix into m*1*n matrix using loops or any other function. I would definitely appriciate if both the methods are illustrated.
Akzeptierte Antwort
Weitere Antworten (1)
Wouter
am 21 Mär. 2013
0 Stimmen
a suggestion: permute(matrix,[1 3 2])
this switches dimension 2 and 3 and effectively changes the size of your matrix
1 Kommentar
Jan
am 21 Mär. 2013
This uses the clearly documented but confusing fact, that in Matlab missing trailing dimensions are assume to be 1 by default.
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!