Explore BrainMass

# MATLAB and projection and perpendicular formulas

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

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,&#8722;3,1,2,1,2)(4, &#8722;5, 2, 6, 1, 3).
b) Using the perpendicular formula and commands in MATLAB, find perp(8,&#8722;3,1,2,1,2)(4, &#8722;5, 2, 6, 1, 3).

© BrainMass Inc. brainmass.com December 15, 2020, 4:27 pm ad1c9bdddf
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.

\$2.19