MATLAB: Shortest distance between two points

dispacementdistanceshortest distancexy coordinates

hi All,
I am trying to calculate a shortest distance between two points.
lets say, an object moved from coordinates (3,4) to ( 7,7).
then distance between these two points can be calculated using simple pythagoras theoram
d=(7-3)^2 + (7-4)^2= 5
I am also trying to calculate shortes distance between these two coordiantes.
if I am trying ds= (7-3)+(7-4)= 7
but ds can not a displacement, as displacement is the shortest distance between two points.
any one can help please?

Best Answer

d=norm([7,7]-[3,4])
ds=norm([7,7]-[3,4],1)