Here is an implementation for the Star algorithm to solve a maze that is a 10 x 10 matrix in MATLAB using App Designer:
appdesigner in the MATLAB command windowuiaxes component onto the app designer canvasTag property of the uiaxes component to mazeAxesuipanel component onto the app designer canvasTitle property of the uipanel component to Actionspushbutton components onto the uipanelText property of the first pushbutton to Generate MazeText property of the second pushbutton to Solve MazePosition property of the Generate Maze button to [20 10 100 22] (adjust the values as per your preference)Position property of the Solve Maze button to [140 10 100 22] (adjust the values as per your preference)uitable component onto the app designer canvasTag property of the uitable component to mazeTablePosition property of the uitable component to [20 40 220 220] (adjust the values as per your preference)*.mlapp file in the MATLAB editorButtonPushed callback of the Generate Maze button:main.m262 chars11 linesButtonPushed callback of the Solve Maze button:main.m870 chars28 linesmain.m1112 chars36 linesThat's it! You should now be able to run the app and generate a random maze, and then solve it using the Star algorithm. The algorithm will display the number of nodes expanded and highlight the path in the maze table.
gistlibby LogSnag