matlab avoid plot to get focus code example Example: matlab avoid plot to get focus f = figure('Visible', 'off');