how to keep waitbar on the application

조회 수: 2 (최근 30일)
Gali Musa
Gali Musa 2019년 2월 17일
편집: Gali Musa 2019년 2월 17일
i tried to use waitbar in an apllication and want it to be built up in the application not seperate. Thank you
f = waitbar(0,'1','Name','Optmization Process...',...
'CreateCancelBtn','setappdata(gcbf,''canceling'',1)');
setappdata(f,'canceling',0);
steps = gen;
for step = 1:0.01:steps
% Check for clicked Cancel button
if getappdata(f,'canceling')
break
end
% Update waitbar and message
waitbar(step/steps,f,sprintf('%12.1f',step))
end
delete(f)
  댓글 수: 1
Geoff Hayes
Geoff Hayes 2019년 2월 17일
Gali - are you using App Designer to integrate the waitbar? It is difficult to read the code that you have posted above so it would be preferrable if you could copy and paste the code to this question.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Dialog Boxes에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by