Creating a distance matrix in Matlab?

조회 수: 6 (최근 30일)
Kenny
Kenny 2011년 12월 10일
Hello I am new to Matlab (I have used it in the past for basic and intermediate calculations).
My question is, does Matlab have a feature which allows one to create a distance matrix. I have the coordinates for several locations and I would like to find Manhattan distances. Is there any way to plot these coordinates to put in "obstacles" to represent actual distances?
Any suggestions?

답변 (2개)

Image Analyst
Image Analyst 2011년 12월 10일
Yes. bwdist. In fact, Steve is talking about it now on his blog: http://blogs.mathworks.com/steve/

Paulo Silva
Paulo Silva 2011년 12월 10일
On the Neural Network Toolbox™ you have the mandist function that seems to do what you need, if you don't have that toolbox try to adapt this to your needs Distance Matrix calculation by Zacharias Voulgaris

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by