reshaping a matrix dimension

6 visualizaciones (últimos 30 días)
AA
AA el 24 de Dic. de 2014
Respondida: Star Strider el 24 de Dic. de 2014
Hi, I have a 2x60 matrix and I want to reshape it to a 120x1 matrix. How can I do that?

Respuesta aceptada

Star Strider
Star Strider el 24 de Dic. de 2014
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);

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by