>> 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:
realmaxhave a special meaning in MATLAB. Avoid using these names for your own variables!
end, but also e.g.
eigcan 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.