reshaping a matrix dimension

6 次查看(过去 30 天)
Hi, I have a 2x60 matrix and I want to reshape it to a 120x1 matrix. How can I do that?

采纳的回答

Star Strider
Star Strider 2014-12-24
It depends on how you want the (120x1) matrix to look. Here are two possibilities:
A = [1:5; 6:10];
B1 = reshape(A, [], 1);
B2 = reshape(A', [], 1);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by