Some remarks about variables

>> A = [1 2;3 4] A = 1 2 3 4 >> A(2,1) ans = 3 >> A(:,2) ans = 2 4 >> A(1,:) ans = 1 2Variables in MATLAB have the following properties:

- case-sensitive (so X is not the same as x)
- maximum length of 31 characters
- start with a letter (so this is allowed: X51483 while this is not allowed: 1abcd)
- the names:
`ans`

,`pi`

,`eps`

,`inf`

,`NaN`

,`i`

,`j`

,`nargin`

,`nargout`

,`realmin`

,`realmax`

have a special meaning in MATLAB. Avoid using these names for your own variables!

`for`

or `end`

, but also e.g. `plot`

, `prod`

and `eig`

can not be chosen. Sometimes you do not get a real error message, but just false results. Be careful with this, give your program a unique name.

Esteur 2010-03-22