How to convert a matrix to a vector

조회 수: 1 (최근 30일)
Boni_Pl
Boni_Pl 2019년 10월 18일
답변: Stephan 2019년 10월 18일
Hello , I have a square matrix let M=[1,2,4;6,5,7;8,3,9]. Now I have to convert it into a column vector as. c=[1;2;4;6;5;7;8;3;9]. How to do this? Please help.

채택된 답변

Stephan
Stephan 2019년 10월 18일
M1=reshape(M.',[],1)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by