Posted By:
20 Mar, 2013 8:57 am PDT

How to write a matrix in Matlab

I want to write a 3x2 matrix or 2 x 2 matrix in matlab.


A = 5 2

      3 4


In the matlab, you type the following to store or create a 2x2 matrix in variable A

>>A = [2 3;4 5];

You can also use comma instead of space bar like this:

>>A = [2,3;4,5]


Please see the video for details

Was it useful?  

Please login to reply to this problem.