Show Percentage of external Script in GUI
2 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Srikanth Sedimbi
on 29 Jan 2018
You can set the 'string' field of the edit text
set(handles.edit1,'string',num2str(percentage));
0 Comments
See Also
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!