フィルターのクリア

Show Percentage of external Script in GUI

2 ビュー (過去 30 日間)
LUAB
LUAB 2018 年 1 月 18 日
回答済み: Srikanth Sedimbi 2018 年 1 月 29 日
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

回答 (1 件)

Srikanth Sedimbi
Srikanth Sedimbi 2018 年 1 月 29 日
You can set the 'string' field of the edit text
set(handles.edit1,'string',num2str(percentage));

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by