Undefined function 'shortestPath' for input arguments of type 'double'.
Show older comments
Every time i use
>> [ending_pts ind] = solveTSP( ending_pts, true );
an error message appears:
Undefined function 'shortestPath' for input arguments of type 'double'.line 20
here is the code that give the message error:
% plot the shortest path
xd=[];yd=[];
for i = 1:(N_cities+1)
xd(i)=ending_pts(shortestPath(i),1);
yd(i)=ending_pts(shortestPath(i),2);
end
line(xd,yd);
title(['Path length = ',num2str(shortestPathLength)]);
hold off;
Any suggestions?
Thanks!
Accepted Answer
More Answers (0)
Categories
Find more on Graph and Network Algorithms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!