Question: >> % Prompt user to enter coordinates of three points >> P1 = input('Enter the x and y coordinates of P1 in the form [x

>> % Prompt user to enter coordinates of three points >> P1 = input('Enter the x and y coordinates of P1 in the form [x y]: ') Enter the x and y coordinates of P1 in the form [x y]: P1 = [] >> P2 = input('Enter the x and y coordinates of P2 in the form [x y]: ') Enter the x and y coordinates of P2 in the form [x y]: P2 = [] >> P3 = input('Enter the x and y coordinates of P3 in the form [x y]: ') Enter the x and y coordinates of P3 in the form [x y]: P3 = [] >> % Plot the triangle in x-y plane >> plot([P1(1) P2(1) P3(1) P1(1)], [P1(2) P2(2) P3(2) P1(2)], '-o') Index exceeds the number of array elements. Index must not exceed 0. not correct

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!