필터 지우기
필터 지우기

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

조회 수: 48 (최근 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
Thomas Firsich
Thomas Firsich 2018년 10월 10일
I am looking for what you can see in the command window.
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