2012-11-25 93 views
0

我已经创建了一个非常简单的Traveling Salesman问题的算法,现在我需要以可视化的格式输出结果。在matlab中绘制TSP图的最简单方法是什么?

我有路权重矩阵和点的正常有序阵列(路径)

互联网是充满了但是我正在寻找一些TSP的非常复杂和具体的例子(如用于DNA研究)基本绘图功能。

+0

如果你知道其中每个点应该是,看到gplot。 – Pete

回答

0

不清楚自己想要什么阴谋,但假设是刚刚生成的路径是很简单的:

x=randperm(10); % Your x coordinates 
y=randperm(10); % Your y coordinates 
% Now plot these points and make sure you add 1 term to return to the starting point 
plot([x x(1)],[y y(1)]) 
相关问题