Skip to main content

Chapter 1 Scalars, vectors and matrices

We will only need three types of Matlab objects: scalars, vectors, and matrices. A scalar is just a single number, like 2.75. Vectors and matrices deserve a more careful look. Being able to use them efficiently is a key to programming in Matlab. Note that “Mat” in “Matlab” stands for “matrix”, not “mathematics”.

The following parts of MATLAB Onramp minicourse are directly related to this chapter:

  • Commands
  • MATLAB Desktop and Editor
  • Vectors and Matrices
  • Indexing into and Modifying Arrays

Note that the above minicourse is presented as a “Live Script” (.mlx file extension), but in MAT 581 we will use standard Matlab scripts (.m file extension). The code syntax is the same for both.