How can I display the command window outputs in App Designer while it is running?

18 次查看(过去 30 天)
I am currently working on making a GUI in App Designer that will be used for a function that has been created. Users select the options and different settings and then the function runs and outputs all of the information to the command window. I was looking into using the diary command and I wasn't sure how it can be implemented into App Designer, I am not as good at using the App Designer compared to just coding in Matlab. I want the command window outputs to be able to continue as the GUI is running to allow the user to see the information, change their inputs, and see the resulting outputs again.
Thanks for any help.
*UPDATE* We decided on adding the diary function into a while loop in our function. The plan is to put the diary function in a while loop that runs the code and then read it after to pass to the GUI. Now we are just trying to figure out how to get that variable on the App Designer side.
  3 个评论
Kevin Chng
Kevin Chng 2018-10-14
编辑:Kevin Chng 2018-10-14
I'm not very understand your intention. However,
save your diary to text file in MATLAB command window
diary a.txt
Then in the app designer, read your text file and then write to TextArea for display.
temp = regexp(fileread('a.txt'), '\r?\n', 'split');
app.TextArea.Value = temp;
However, diary off will be display at the text area as well. If you don't to display the diary off, you may change temp to
temp(1:end-1)

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by