MATLAB and projection and perpendicular formulas
Hi,
Can you help me with the Question in the second page of this assignment?
a) Using the projection formula and the dot and norm commands in MATLAB, find proj(8,−3,1,2,1,2)(4, −5, 2, 6, 1, 3).
b) Using the perpendicular formula and commands in MATLAB, find perp(8,−3,1,2,1,2)(4, −5, 2, 6, 1, 3).
https://brainmass.com/math/basic-algebra/matlab-projection-perpendicular-formulas-250154
Solution Preview
The following formulae were used:
〖proj〗_b ⃗ (a ⃗ )= (a∙b ̂ ) b ̂
〖perp〗_b ⃗ (a ⃗ )= a ⃗-(a∙b ̂ ) b ̂
b ̂=unit vector in the direction of b ⃗
MATLAB CODE:
clear all; % clearr workspace
close all; % close all workspace windows (if there are figures opened)
clc; % clear the command window
% This code assumes proj_b(a) as being the projection of vector "a" in
% the ...
Solution Summary
This provides an example of using projection formula, perpendicular formal, and dot and norm commands in MATLAB.