MATLAB: Find distance between 2 points

finddistance

I need to find the distance between 2 points. what is wrong with the script?
function d = finddist(A,B)
s = B-A
d = findmod(s)
this is what is coming when i am running it. Error using finddistance (line 2) Not enough input arguments. please help me out with the corrections to be done.

Best Answer

Not to rain on your parade, but I would just use the hypot function.