Be sure to type diary on
to start your work session. Please name your diary file (first initial)(Last name)L02. For example, my file would be jMearsL02.
rand
function creates a row vector, column vector, or matrix with pseudo-random entries between 0 and 1. (type help rand
for more information). Create a new matrix $F$ which is $3\times 3$ and has all random entries.:
operator. It allows us to easily create vectors with equally spaced elements. For example, type z = 1:10
into MATLAB© and describe the results. Next type w = 1:2:10
into MATLAB© and describe the results. What does the middle term :2:
determine? Now using this idea and the :
operator to replace the first row of $D$ with the vector $(2, 4, 6, 8)$.:
operator to create the vector $y = \left(0,\dfrac{\pi}{2},\pi,\dfrac{3\pi}{2},2\pi\right)$. Then enter sin(y)
and explain the results.
© 2020 Justin L. Mears
Your use of any material found at this site is subject to this
Creative Commons License.