However, there is a small "bug": the drawnow call should not be placed outside the if-else blocks of the main function. This causes significant computational overhead, despite the author's intention to avoid it by limiting the "refresh" to once in 0.5 seconds.