MATLAB: How to reshape and rearrange a matrix in a specific way

MATLABmatricesmatrix manipulation

How can I rearrange the following 3×2 matrix: [0, 0; -0.001, 0; 0, 0.02]
to look like this 6×1: [0; 0; -0.001; 0; 0; 0.02]?
I've tried the reshape function but think I'm using the wrong arguments. Thanks.

Best Answer

If A is matrix. USe
iwant = A(:)
Example:
A = [0, 0; -0.001, 0; 0, 0.02] ;
A = A' ;
iwant = A(:)