Borrar filtros
Borrar filtros

Returning matrix value back from Single-Indexing-colon matrix

1 visualización (últimos 30 días)
KaMu
KaMu el 27 de Nov. de 2013
Comentada: KaMu el 27 de Nov. de 2013
If I have a matrix 3X5: A =
1 2 3 4 5
4 3 2 1 5
7 5 3 2 5
and I want to convert it into single-indx matrix
d=A(:)
d =
1
4
7
2
3
5
3
2
3
4
1
2
5
5
5
Q: is there a simple way to return the matrix 'A' again from 'd' to its original 3X5 again? Why I am doing that? because using this way in my code, I am saving lots of time of calculations.

Respuesta aceptada

Walter Roberson
Walter Roberson el 27 de Nov. de 2013
reshape(d, 3, 5)

Más respuestas (0)

Categorías

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

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by