USING MAT LAB CODE A vector wL of length L in the direction
USING MAT LAB CODE: A vector w_L of length L in the direction of a vector u = xi = yj + zk can determined by w_L = Lu__n (multiplying a unit vector in the direction of u by L). The unit vector u_n in the direction of the vector u is given by u+n = xi + yj + zk/squareroot x^2 + y^2 + z^2. By writing one MATLAB command, determine a vector of length 18 in the direction of the vector u = 7i - 4j - 11k.
Solution
u=[7 -4 -11]
L= 18;
wL=L.*u./sqrt(sum(u.^2))
mat lab output:
wL=
9.2388 -5.2793 -14.5181
