I very new to matlab, and have a problem i'm stuck on. I have a 8 x 15 matrix:
a=
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0=walls, obstacles
0 2 3 3 3 3 3 3 3 3 3 3 3 3 0
0 1 3 3 3 3 3 3 3 3 3 3 3 3 0
0 3 3 3 3 3 3 3 3 3 3 3 3 3 0
0 3 3 3 3 3 3 3 3 3 3 3 3 3 0
0 3 3 3 3 3 3 3 3 3 3 3 3 3 0
0 3 3 3 3 3 3 3 3 3 3 3 3 3 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
I have to write a program that simulates a robot that starts on a(3,2) and covers 100%, excluding the 0s, of the matrix by going down the second column,while changing the 3s to 4s, then moving to the third and going up, and so on. the robot only moves one space at a time and must return to starting position when finished with the matrix. I have some script for the first column, but only works for the first move. can anyone please help, I would be greatful for even push in the right direction.
a=
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0=walls, obstacles
0 2 3 3 3 3 3 3 3 3 3 3 3 3 0
0 1 3 3 3 3 3 3 3 3 3 3 3 3 0
0 3 3 3 3 3 3 3 3 3 3 3 3 3 0
0 3 3 3 3 3 3 3 3 3 3 3 3 3 0
0 3 3 3 3 3 3 3 3 3 3 3 3 3 0
0 3 3 3 3 3 3 3 3 3 3 3 3 3 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
I have to write a program that simulates a robot that starts on a(3,2) and covers 100%, excluding the 0s, of the matrix by going down the second column,while changing the 3s to 4s, then moving to the third and going up, and so on. the robot only moves one space at a time and must return to starting position when finished with the matrix. I have some script for the first column, but only works for the first move. can anyone please help, I would be greatful for even push in the right direction.