MATLAB derives its name from ''matrix laboratory'' and, as the name implies, is well suited for mathematics, science and engineering applications where matrices are used extensively. The high-level matrix language is supported by a large library of mathematical functions and an impressive set of graphical facilities. The principal data type in MATLAB is an NxN matrix of complex numbers (using imaginary i). There are also three special cases consisting of 1xN row vectors, Nx1 column vectors and 1x1 scalars. A number is a scalar 1x1 matrix which can be concatenated using [] and ; to form larger matrices. Thus:- [ 1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15 ] represents:- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 In general, matrices of arbitrary size may be concatenated to form larger matrices. So:- [ A B; C D ] is a concatenation of four matrices. The basic operators are matrix operators and as such A * B indicates matrix multiplication requiring that A is LxM and B is MxN. Element-wise operators are denoted by a preceding dot. So A .* B denotes element-wise multiplication and requires that both A and B be MxN. This use of matrices can have some interesting consequences for several aspects of programming using MATLAB: * The comparison A == B yields a matrix of 0s and 1s indicating the results of element-wise comparison. The proper test for matrix equality is isequal(A, B). * For-loops can be eliminated in many cases by the proper use of index operators. For example, the expression A(:, end) refers to ''all'' the elements in the ''last'' column of the matrix A. * It should be noted that MATLAB is, sometimes, orders of magnitude faster when running a program that calculates using vectors. ---- See: http://www.mathworks.com/, InteractiveDataLanguage