Section11.4MATLAB 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 chapter10_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!
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.