Question: Help! And please make sure to look at the bottom half of the question. 2The distance between two points in three-dimensional space is where point
2The distance between two points in three-dimensional space is where point 1 has coordinates (xi.yi and polnt 2 has coordinates (x2.y2). For each point the x, y z coordinates are stored in a vector of length 3. Write a MATLAB function named dist which computes the distance between two points. The arguments to the function are the two vectors containing coordinates. The result returned is the distance. Include comments in the function. The following are examples of the function being used. >> point1=[ 1 3 71; >> point2 = [ 1 3 8 ]; >> point3 12 4 81: > d1 dist (point 1,point2) d1 1.0000 d2 - dist (point1 point3) d2 1.7321 >> d3 - dist (point 1,point1) d3 = 0.0000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
