Skip to main content

Section 10.4 MATLAB Functions for Working With Arrays

As mentioned in the previous chapter, arrays are the fundamental way to store data in MATLAB. Fun fact: a scalar in MATLAB is actually just stored as a 1x1 array!
Because arrays are so fundamental to the way that MATLAB operates, MATLAB comes pre-packaged with several functions that can perform analysis on arrays. A non-comprehensive (but useful) list of these functions is presented in the table below.
To learn these, I suggest that you create a new section of your chapter9_examples.m script, and practice them on the 4 Workspace variables (mat1,mat2,vec1,vec2) that we have been using this chapter. Donโ€™t forget to read the help text on these functions as well as it can be very helpful!
In table 10.4.1, A is considered an array (donโ€™t forget an array can be a vector or a matrix).
Figure 10.4.1. A collection of functions that work specifically on arrays.
Note: some of the functions above work a little differently on matrices than on vectors. For example) in the command window type help std, read the help text introductory paragraph, then answer the following question.
For this question, consider a 5x8 matrix stored in the variable random_man with random values. When the user types in y = std(random_man) ...

Checkpoint 10.4.2. Help! std.

You have attempted of activities on this page.