MATLAB Answers

Boni_Pl
0

How to convert a matrix to a vector

Asked by Boni_Pl
on 18 Oct 2019
Latest activity Answered by Stephan
on 18 Oct 2019
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.

  0 Comments

Sign in to comment.

1 Answer

Answer by Stephan
on 18 Oct 2019
 Accepted Answer

M1=reshape(M.',[],1)

  0 Comments

Sign in to comment.