find distance between 2 points

1 次查看(过去 30 天)
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.
  2 个评论
Jan
Jan 2014-11-16
The error message contains "finddistance", but you post the code of "finddist". Which is "line 2"?
RITTIK KUMAR GHOSH
RITTIK KUMAR GHOSH 2014-12-29
thankyou for the help, appreciated it.

请先登录,再进行评论。

采纳的回答

Star Strider
Star Strider 2014-11-15
Not to rain on your parade, but I would just use the hypot function.
  7 个评论

请先登录,再进行评论。

更多回答(0 个)

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by