File Exchange

image thumbnail

A-star Search Algorithm

version (20.9 KB) by Wei Wang
MATLAB/C++ mixed implementation for Astar search algorithm.


Updated 15 Aug 2005

No License

MATLAB/C++ mixed implementation for Astar search algorithm

1. Extract the zip file
2. Type "Mex Astar.cpp" in MATLAB command window to generate Astar.dll (you must choose to have such ability when installing MATLAB)

"Spath_test.m" is a sample file to compare the performance of Dijkstra and A-star.

Cite As

Wei Wang (2021). A-star Search Algorithm (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (6)


When I tried to compile, I received the following error:

Astar.cpp(6) : fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory

Si Merabet Fatima

I need more details of program. I haven't undestund wy you have put // ( comments )before lot of instructions.

Emad Hasan

Needed a lot of improvements, i just added an updated file recently that implements the A-Star more precisely.

Eyup Ciar

Good! but can be excellent with more comments and details inside the codes.It would be better to see more explanatory m file here.

sara vanan.k

i want full details of the program

Michal Kvasnicka

Some decsrciption, references (A-star method) and "astar.m" matlab header file (with brief help) will be very useful.

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: Dijkstra Shortest Path Routing

Inspired: A Star implemented in Matlab

Community Treasure Hunt

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

Start Hunting!