find distance between 2 points

4 Ansichten (letzte 30 Tage)
RITTIK KUMAR GHOSH
RITTIK KUMAR GHOSH am 15 Nov. 2014
Kommentiert: Star Strider am 29 Dez. 2014
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 Kommentare
Jan
Jan am 16 Nov. 2014
The error message contains "finddistance", but you post the code of "finddist". Which is "line 2"?
RITTIK KUMAR GHOSH
RITTIK KUMAR GHOSH am 29 Dez. 2014
thankyou for the help, appreciated it.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Star Strider
Star Strider am 15 Nov. 2014
Not to rain on your parade, but I would just use the hypot function.
  7 Kommentare
RITTIK KUMAR GHOSH
RITTIK KUMAR GHOSH am 29 Dez. 2014
thank you for all the help
Star Strider
Star Strider am 29 Dez. 2014
My pleasure!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by