Self-check exercise: Basic Array Creation
-
Create a column vector in which the first element is 20, the elements decrease with increments of -5, and the last element is -40.
-
Create a row vector with 20 equally spaced elemetns in which the first element is 5 and the last element is 70.
-
Create the matrix shown below by using the vector notation for creating vectors with constant spacing and/or the linspace command when entering the rows.
0 4 8 12 16 20 24 28
69 68 67 66 65 64 63 62
1.4 1.1 0.8 0.5 0.2 -0.1 -0.4 -0.7
The following exercises are taken from the manuscript "MATLAB: An Introduction with Applications" by Amos Gilat