Converting a matrix into an array

3 次查看(过去 30 天)
Andrew Wiebe
Andrew Wiebe 2015-10-6
评论: Stephen23 2015-10-6
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 个评论
Stephen23
Stephen23 2015-10-6
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.

请先登录,再进行评论。

回答(1 个)

Star Strider
Star Strider 2015-10-6
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’

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by