Azzera filtri
Azzera filtri

How to add progress bar to a code which has different process times according to data

3 visualizzazioni (ultimi 30 giorni)
Hello all,
I have a code which user uploads bunch of files. Some calculations occur after that. Anyway according to number of uploaded files, the process time changing for each run. I want to add a progress bar which calculates the process time of code and give the progression percentage with regards to the process time.
For example, let's say process time is 30 seconds for 15 files and 56 second for 24 files.
I hope I asked my question clear.
Thanks in advance.

Risposte (1)

Cris LaPierre
Cris LaPierre il 1 Gen 2021
Use a waitbar. You would update the progress at certain stages along the way, allowing the progress to accurately reflect the processing of the data.
One thing to be aware of is this will impact the speed at which your code runs, so you'll want to balance the number of times you update the waitbar with the speed at which your code processes the data.

Categorie

Scopri di più su Environment and Settings in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by