Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function ProjectionPlot that plots the vectors a = OA, b = OB, and c = OC, where c is the projection of a

Write a function ProjectionPlot that plots the vectors a = OA, b = OB, and c = OC, where c is the projection of a onto b

For your problem, A = (6,3), B = (3,6). All plots must be in the same figure in the order indicated in the function template. The projection vector cshould be plotted in the colour black, with a line thickness of 1. The vectors a and b do not require any customisation to line colour, thickness, etc.

The vector c may be calculated using MATLAB or by hand.

The function template is provided below.

function ProjectionPlot()

c = 0;

hold on

%insert plot of OA

%insert plot of OB

%insert plot of OC

hold off axis('equal')

end

This is what I have so far:

function c = ProjectionVector(a,b)

x = [0,2.4]; y = [0,4.8]; hold on c=(dot(a,b)./(norm(b)^2)).*b;

plotv(a); plotv(b); plotv(c,'k','LineWidth',1); hold off axis('equal') end

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

Define marketing.

Answered: 1 week ago

Question

LO2 Discuss important legal areas regarding safety and health.

Answered: 1 week ago