function yes = goal_reached(state) r = all(state(:,1:3) == 0,2); yes = false; if size(state(r),1) > 0 yes = true; printf("goal reached\n") end end