find distance between 2 points

4 visualizzazioni (ultimi 30 giorni)
RITTIK KUMAR GHOSH
RITTIK KUMAR GHOSH il 15 Nov 2014
Commentato: Star Strider il 29 Dic 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 Commenti
Jan
Jan il 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 il 29 Dic 2014
thankyou for the help, appreciated it.

Accedi per commentare.

Risposta accettata

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

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by