Error: A(:) = B, the number of elements in A and B must be the same.
Mostrar comentarios más antiguos
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.
2 comentarios
Image Analyst
el 11 de Feb. de 2018
How are we to know which line threw that error? You forgot to include the complete error, which includes the line number and line of code. Please include ALL THE RED TEXT.
Ammar Babikir
el 11 de Feb. de 2018
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Programming en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!