Chapter 5 Exercises

MATLAB Exercises

  1. Set

    x=[0:4,4,4,1,1]andy=ones(9,1)
    1. Use the MATLAB function norm to compute the values of x,y,x+y and to verify that the triangle inequality holds. Use MATLAB also to verify that the parallelogram law

      x+y2+xy2=2(x2+y2)

      is satisfied.

    2. If

      t=xTyxy

      then why do we know that |t| must be less than or equal to 1? Use MATLAB to compute the value of t and use the MATLAB function acos to compute the angle between x and y. Convert the angle to degrees by multiplying by 180/π. (Note that the number π is given by pi in MATLAB.)

    3. Use MATLAB to compute the vector projection p of x onto y. Set z=xp and verify that z is orthogonal to p by computing the scalar product of the two vectors. Compute ...

Get Linear Algebra with Applications, 10th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.