Borrar filtros
Borrar filtros

Show Percentage of external Script in GUI

1 visualización (últimos 30 días)
LUAB
LUAB el 18 de En. de 2018
Respondida: Srikanth Sedimbi el 29 de En. de 2018
Hello everybody!
Following problem: I created a GUI including a text field with the tag "percentage". In this GUI script (at the end of it) I added my external function. In a nutshell: When I press the "Calculate" button in my GUI, I want that my function gets called. That works fine, my function gets calucated without any problems. Following a simplified version of my function:
function myfun(input1)
for i=1:50
d = input1 * i;
percentage = i/50*100;
end
end
Now I want that the percentage of the calculation gets updated in my text field "percentage", so it shows the progress of the "for" command in my function. But I really don't know how I can updated a created string of a text field.
Thanks in advance! Paul

Respuestas (1)

Srikanth Sedimbi
Srikanth Sedimbi el 29 de En. de 2018
You can set the 'string' field of the edit text
set(handles.edit1,'string',num2str(percentage));

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by