修改A*的命令窗口输出

This commit is contained in:
张梦南 2025-06-02 19:45:44 +08:00
parent 16609a6699
commit 53270692e9

View File

@ -61,5 +61,13 @@ while ~isequal(node(4:5),initial)
path=[node(4:5); path];
node=closed(BinA(closed(:,1:2),node(4:5)),:);
end
path
%
if ~isempty(path)
disp('');
for i = 1:size(path, 1)
fprintf('(%d, %d)\n', path(i, 2), path(i, 1));
end
else
disp('');
end
end