**This is an old revision of the document!** ----
====== Math 445 lab 2: vectors ====== Do the following in Matlab, saving your work to a file with the ''diary'' command. Reduce unnecessary whitespace with the ''format compact'' command. When you're done, edit the diary file to eliminate errors, so that your diary shows just the correct work. You can submit your lab either via Canvas or as a print out. 1. Assign a row vector with elements 3, 4, 5, 9 to the variable u. 2. Assign the transpose of u to the variable w. 3. Change the third element of w to 10. 4. Make x a vector from 0 to $2\pi$ in increments of 0.02. 5. Run ''plot(x, sin(x))''. What happens? 6. Run ''plot(x, sin(x), 'r--')''. What happens? 7. Run <code> plot(x, sin(x), 'r--', x, cos(x), 'm-') xlabel('x') legend('sin x', 'cos x') </code> 7. Compute the sum of the integers from 1 to 100. 8.