How can i measure the distance between points in a scatter graph
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Looking to measure the Manhattan distance between the points on my scatter graph
0 comentarios
Respuestas (1)
José-Luis
el 10 de Feb. de 2017
2 comentarios
José-Luis
el 10 de Feb. de 2017
You are trying to get the distance of a graphic object handle (in your case a line).
Perhaps this is what you meant:
x = [0, 6, 6, 6, 7, 7, 8, 8];
y = [0, 0, 2, -2, 2, -2, 2, -2];
D = pdist([x',y'],'cityblock')
Please read the documentation. Also, please accept the answer that best solves your problem.
Ver también
Categorías
Más información sobre Statistics and Machine Learning Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!