This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: dot command. For example, the dot product of vectors a = (4 , 3 ,-1) and b = (-2 , 5 , 3) can be found as follows: >> a = [4; 3; -1] >> b = [-2; 5; 3] >> dot(a, b) MATLAB returns that the dot product is 4. To nd the length of a vector in MATLAB, use the norm command. For example, the length of a from the previous example can be found as follows: >> norm(a) MATLAB returns that the length of a is 5 . 0990. (a) Using the projection formula and the dot and norm commands in MATLAB, nd the matrix A = [ proj (8 ,-3 , 1 , 2) ]. (b) Using your result from part (a), nd [ proj (8 ,-3 , 1 , 2) ](4 ,-5 , 2 , 6). 2...
View Full Document