I want to visualize all of the paths on 2D square in matlab.
This code gives me the following figure which consists of a 2D square and randomly distributed of 1 and 0.
Each 1's must connected with lines from top to bottom.
If there is 1, then there is a way and I have to plot line. Otherwise therre is no way and stop.
Without the boundary elements, there are 3 way for each elements. Each element can go left side, right side or down side.
The top left hand corner's element can go right and down direction.
The top right hand corner's element can go left and down direction.
This is the algorithm of the modelling.
How can I write this code ?
I am waiting your advise :)