2012-11-25 88 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)]) 
相關問題