필터 지우기
필터 지우기

Converting a matrix into an array

조회 수: 10 (최근 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