how i find the euclidean distance between two data points x and y....?
3 views (last 30 days)
Show older comments
hi, I need to find the euclidean distance between two data points x and y from the Rn space is calculated as follows :

in matlab how i do programming code....???Looking for your reply.
0 Comments
Answers (1)
Image Analyst
on 24 Nov 2016
Edited: Image Analyst
on 25 Nov 2016
Try norm() or hypot(), or simply sqrt().
But you don't have to do it manually you know. There are functions like kmeans() and knnsearch() in the Statistics and Machine Learning Toolbox.
2 Comments
Image Analyst
on 25 Nov 2016
This might help: http://www.mathworks.com/matlabcentral/answers/8026-best-way-s-to-master-matlab or else just run through the examples given for kmeans in the help or online.
See Also
Categories
Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!