Assignment 5: Matlab

Helpful tutorials
http://spicerack.sr.unh.edu/~mathadm/tutorial/software/matlab/
http://www.math.ufl.edu/help/matlab-tutorial/
http://www.math.mtu.edu/~msgocken/intro/intro.html

  1. Some linear algebra stuff to warm up. Let A be the matrix
       -1.4020   -2.2683   -3.7234   -2.9761
       -0.0127    3.3897   -1.2109   -0.4755
        4.8838    2.6045    7.8947    3.8263
       -1.8638   -2.2934   -1.1351    1.1177
    
    Find the determinate, trace, transpose, inverse, minimal polynomial, eigenvalues and eigevectors. For each eigenvector x check Ax - lambda x, Let B be the matrix with the eigenvectors as columns. Compute inverse(B)*A*B and compare it to the diagonal matrix of eigenvalues. Solve Ax=[1;2;3;4].
  2. Plotting 2D plot the function e^x sin x over -2pi to 2pi and plot it together with x sin x and (sin x) /x.
  3. Figure out how to write vectors x and y to a file (I used dlmwrite) and read it back again (I used load) to plot(x, y).
  4. Plotting 3D plot, plot the functon f(x,y) = sin x sin y over a 2 pi period in both variables. Try mesh, surf, various shading and some colormaps. Do a contour map too. [surfc, surfl,pcolor]