Borrar filtros
Borrar filtros

print all elements of matrix in single row

2 visualizaciones (últimos 30 días)
raj singh
raj singh el 13 de Dic. de 2014
Respondida: Star Strider el 13 de Dic. de 2014
I have a matrix A=[1 2;3 4]; i wan to single row with all elements of A like like this
B=[1 2 3 4]
Please help me

Respuestas (1)

Star Strider
Star Strider el 13 de Dic. de 2014
This works:
A=[1 2;3 4];
B = A(:).';

Categorías

Más información sobre Multidimensional Arrays 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