not display in edit text box matlab GUI
1 次查看(过去 30 天)
显示 更早的评论
i write a code:
fid = fopen('1.txt','r');
indata = textscan(fid, '%f', 'HeaderLines',1);
fclose(fid);
yourdata = indata{1};
set(handles.edit1,'%f',display(yourdata)); but the value is not display in edit text box. pls suggest what i change to display the number.
1 个评论
Rik
2018-5-29
I re-opened this question. If you have trouble with an answer, ask for clarification instead of closing and posting a new one.
采纳的回答
Rik
2018-5-28
uicontrol objects have a String property that you need to set. The line below should help you along.
set(handles.edit1,'String',sprintf('%f',yourdata));
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!