Need help on this short and supposedly simple problem for MATLAB.
Suppose there is a square matrix: A = [2 1 2 1; 2 2 1 1; 2 1 2 1; 1 2 2 2].
Where:
2 = blocked (cant go there)
1 = can move there
What can I write on MATLAB that can allow me to choose a two spots in the given matrix and locate these spots as start and finish. And then when matlab runs, it will show me how to move from the start to the finish position, showing the co-ordinates as it goes through.
Comments
Leave a comment