Explore BrainMass

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!


    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).

    © BrainMass Inc. brainmass.com December 15, 2020, 4:27 pm ad1c9bdddf


    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 ⃗
    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.