Hello, i have 2d n*n random matrix. I need to find the shortest way from one matrix element on the edge to another element on the edge of field. I tried to use a* and dijkstra methods, but its based on graphs. Is there any ways to convert 2d matrix into graph or other ways to solve this problem?
5 Comments
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/722518-shortest-path-in-a-2d-matrix#comment_1275468
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/722518-shortest-path-in-a-2d-matrix#comment_1275468
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/722518-shortest-path-in-a-2d-matrix#comment_1275543
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/722518-shortest-path-in-a-2d-matrix#comment_1275543
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/722518-shortest-path-in-a-2d-matrix#comment_1277253
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/722518-shortest-path-in-a-2d-matrix#comment_1277253
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/722518-shortest-path-in-a-2d-matrix#comment_1288933
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/722518-shortest-path-in-a-2d-matrix#comment_1288933
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/722518-shortest-path-in-a-2d-matrix#comment_1289003
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/722518-shortest-path-in-a-2d-matrix#comment_1289003
Sign in to comment.