Matrices in MATLAB

 

  • An array is simply a collection of numbers or strings (text) and matrices are 2-dimensional arrays e.g. collection of numbers in the horizontal and vertical directions to make a square or rectangle of numbers.
  • MATLAB is capable of computing 3-dimensional arrays (imagine a cube or cuboid of numbers) or higher but these are quite difficult to imagine. This course would be chiefly based on number matrices. (For information on more complex arrays and manipulation of strings follow this link: String Arrays)
  • Matrices are an integral component in computation with MATLAB. Even parameters declared as single numbers (e.g. A = 2) are understood as 1-by-1 matrices by the program.
  • NB: All code or commands within the text that appear as they would in the MATLAB code, will be highlighted in light blue. Also, it is recommended that you revise matrix algebra before going through the instructions that follow; doing a couple of hand calculations to verify some of the results displayed below would go a long way in improving understanding and retention of the material.