How can i measure the distance between points in a scatter graph
조회 수: 7 (최근 30일)
이전 댓글 표시
Looking to measure the Manhattan distance between the points on my scatter graph
댓글 수: 0
답변 (1개)
José-Luis
2017년 2월 10일
댓글 수: 2
José-Luis
2017년 2월 10일
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.
참고 항목
카테고리
Help Center 및 File Exchange에서 Scatter Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!