print all elements of matrix in single row

9 visualizzazioni (ultimi 30 giorni)
raj singh
raj singh il 13 Dic 2014
Risposto: Star Strider il 13 Dic 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

Risposte (1)

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

Categorie

Scopri di più su Elementary Math in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by