When I create a new figure, the focus is still on the MATLAB application even though the figure window is on top. To activate any buttons or interact with the figure in any way, I have to click on it once just to gain focus and then click on it again to interact with it. Is there a command to give the window focus without having to click on it?
For example, the following code generates a figure window in the foreground, but it doesn't gain focus until it is clicked:
plot(1:10)
Best Answer