Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

hint is to place close all before the plot statements, and axis equal after them

ID: 3550640 • Letter: H

Question


hint is to place close all before the plot statements, and axis equal after them to make a new figure window pop up every time you run your pgoram and it will make the axis scaling look nice like the one shown.

Write a MATLAB function M - file named Vector Plot to draw lines on a Figure Window to represent 2D vectors. The user will enter the two vectors as input to the function. The function will have no output values, but will just plot the vectors. The first vector should be colored as magenta and have a circle marker. The second vector should be cyan, with a plus marker. Include a title and legend on the plot. Example: Draw the vectors from the first example in Part 1 >> a = [3 6] a = >> b = 3[ - 2 2]6 b = >> - 2 Vectorplot (a,b)

Explanation / Answer


the matlab functions wirk accotding to this

function [] = VectorPlot( a,b )

close all

plot([0 a(1)],[0, a(2)],'-mo');

hold on// holding here

plot([0 b(1)],[0, b(2)],'-c+');


legend('vector a','vector b')

axis equal

end // ends the program

now its the complete program for you .. thanks rate for the efforts