How do i show output from program in the uitextarea?
显示 更早的评论
I have a GUI(has a uitextarea) which takes few inputs and can initiate a program's run.. The GUI has a uitextarea in it.
In the program a certain string will be printed multiple times.
I have tried the following to show the output to the uitextarea
for 1:100
app.OutputTextArea_2.Value = textToDiplay + i;
It is working..But it replaces the earlier values.
May I know how I can keep appending the current text to the already existing text uitextarea.
Thanks.
采纳的回答
更多回答(1 个)
Geoff Hayes
2017-4-13
frank - try concatenating the existing data with the new
for k = 1:100
app.OutputTextArea_2.Value = [app.OutputTextArea_2.Value "," num2str(textToDiplay + k)];
end
It's unclear what your i and textToDiplay are strings or numbers. I've assumed the latter, so have used num2str to do the conversion.
类别
在 帮助中心 和 File Exchange 中查找有关 Error Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!