how to make a 3x3 matrix a 9x1 matrix?

12 次查看(过去 30 天)
Hey i have a matrix x=[ 1 4 7; 2 5 8 ;3 6 9]; how do I make this matrix become x=[ 1;2;3;4;5;6;7;8;9];

采纳的回答

Birdman
Birdman 2018-4-3
编辑:Birdman 2018-4-3
reshape(x,9,1)
or
x(:) % this creates a column vector out of a matrix

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by