Use an indeterminate progress dialog and update the .Message property; it will be updated w/o the drawnow. I use it to show progress during a running app and it works well for the purpose.
A code snippet from that app
...
% insert a progress dialog for grins...
h=uiprogressdlg(app.RestrictedAwardsUIFigure, ...
"Title",'Please Standby...',"Message",'Reading Billing',"Indeterminate","on");
% and finally, do the work...
[tBill,tPay,allBills]=readBilling(app.billQualFile,app.billSheet,app.accountingYear,app.semester,app.billUpdate,h);
h.Message='Writing Awards';
writeAwards(tBill,tPay,app.year,app.semester,app.accountingYear,app.awardQualFile,app.awardSheet,h);
h.Message='Update Complete';
pause(0.5)
close(h)
...
The handle is passed to the other routine and inside it is...
function writeAwards(tBill,tPay,year,semester,FY,fn,sheet,varargin)
% fn,sheet - Restricted Awards filename, sheet to update
...
% optional argument for progress bar update fund name
hPrg=[];
if ~isempty(varargin), hPrg=varargin{1}; end
...
% Update all restricted awards from billing for spring/fall sheet
...
for i=1:numel(restrFunds)
ttmp=tBill(ismember(tBill.Fund,restrFunds(i)),{'ROW','SID','Student','Scholarship','FundName','Fund','Paid'});
...
if ~isempty(hPrg) % update progress bar message
hPrg.Message=[ttmp.Fund{1} ' ' ttmp.FundName{1}];
end
...
end
...
