print all elements of matrix in single row

9 Ansichten (letzte 30 Tage)
raj singh
raj singh am 13 Dez. 2014
Beantwortet: Star Strider am 13 Dez. 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

Antworten (1)

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

Kategorien

Mehr zu Elementary Math finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by