adding time consuming bar(waiting bar) to MatLab GUI for push button
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sahan Priyanga
am 23 Nov. 2015
Kommentiert: Stalin Samuel
am 24 Nov. 2015
I have created MatLab GUI and it execute matlab script by clicking button on GUI.
now I want method for showing time consuming for run of that script
following code shows how I did that so far
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
run('resizeingDONTDELETE.m');
end
I find a code for show wait bar but it is not worked!!!!
h = waitbar(0,'Please wait...');
steps = 1000;
for step = 1:steps
run('resizeingDONTDELETE.m');
waitbar(step / steps)
end
close(h)
here I want the results as follow,
- when push button is clicked wait button should be open and should show time as zero
- time should be increased with time taken to executing the script
- after executing wait bar should be disappered
can anyone help me .......
3 Kommentare
Walter Roberson
am 23 Nov. 2015
When you run('resizeingDONTDELETE.m') does that do all of the work, or does it only do the work for a single image numbered step ?
Akzeptierte Antwort
Stalin Samuel
am 23 Nov. 2015
3 Kommentare
Stalin Samuel
am 24 Nov. 2015
h = waitbar(0,'Please wait...');
tic
t_total = 55;
while toc < t_total
%%your calculation
waitbar(toc / t_total )
end
close(h)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!