Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

>> % 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

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

Hands On Database

Authors: Steve Conger

1st Edition

013610827X, 978-0136108276

More Books

Students also viewed these Databases questions