Question: Use the pdist2 function (use >>help pdist2 to find out more about it) to calculate the distance between the following points: p1 = 7.5, 13.0

 Use the pdist2 function (use >>help pdist2 to find out more

Use the pdist2 function (use >>help pdist2 to find out more about it) to calculate the distance between the following points: p1 = 7.5, 13.0 p2 = 6,12 Save the result in a variable named d1. Then, write a function that will calculate the Euclidian distance between two points (A & B) where euclideanDistance = sqrt((A1-B1)^2+(A2-B2)^2); Save the result in a variable named d2. Compare the two results and use fprintf to show your answers

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!