Posted By:
23 Mar, 2013 11:55 am PDT

How to define variables, arrays, matrices, strings in matlab

I am new to Matlab and I want to define variables, array, strings in Matlab so that I can play with them,
Please let me know how can I do it?



To define a variable

>>a = 1


To define an array



To define a matrix

>>b=[4 , 5; 6 ,7]


To define a string

>>c = 'John';


To define a string with prime in it

>>c = 'John''';


To define a cell

>>d = {'123'}

Please watch video for details

Was it useful?  

Please login to reply to this problem.