Filter löschen
Filter löschen

Converting a matrix into an array

10 Ansichten (letzte 30 Tage)
Andrew Wiebe
Andrew Wiebe am 6 Okt. 2015
Kommentiert: Stephen23 am 6 Okt. 2015
How would i convert a matrix into an array, where each column of numbers turns into a single element(matrix)? so all I'm left with is an array with one row and a certain number of columns?
  1 Kommentar
Stephen23
Stephen23 am 6 Okt. 2015
A matrix is an array already, so you either a) don't need to do anything, or b) need to explain in more detail what you are trying to do. Currently your question is not clear.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Star Strider
Star Strider am 6 Okt. 2015
I’m not certain what you want.
Does this work in your application?
A = randi(9, 4); % Matrix
B = A(:)'; % Row Matrix Of Elements Of ‘M’

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by