Question: Your task is to demonstrate the ginput command by completing the following steps: Define an array of angles from 0 to 2?, with a spacing
Your task is to demonstrate the ginput command by completing the following steps:
Define an array of angles from 0 to 2?, with a spacing of ?/100.
Use the array of angles to create a graph of a circle.
Use the ginput function to pick two points on the circumference of the circle.
Use hold on to keep the figure from refreshing, and plot a line segment between the two points that were picked.
Use the data from the points to calculate the length of the line segment between them (Hint: use the Pythagorean theorem, also known as the distance formula.)
Use sprintf to create a string with a sentence stating the distance between the two points.
Add text (showing your sentence from Step 6) to the graph near one of the selected points.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
