Hi everyone, I can't seem to understand why this piece of code:
while( empty_cond ~= 0 && myStack.peek()~= goal) %pop first index from the stack
i = myStack.pop(); %if node at i has not been visited
if ( visited(i) == 0) %mark it as visited
visited(i) = 1; neighbors(i) = sense_maze(i, data); end
I end up getting this error:
In an assignment A(:) = B, the number of elements in A and B must be the same.
Error in RUNME (line 55) neighbors(i) = sense_maze(i, data);
I also attached a picture of the workspace.
Best Answer