Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started