how to display results in matlab gui (text)

조회 수: 13 (최근 30일)
Huseyin
Huseyin 2014년 2월 28일
편집: per isakson 2015년 7월 6일
Hello,
I want to display the results shown in command window by clicking push button. I mean, I created a function and when I run that function the results are shown in matlab command window. Now I am making an interface with matlab gui and want to show that result in a new figure by clicking push button. How can I do that?
Thanks..
  댓글 수: 1
Jan
Jan 2014년 2월 28일
It depends on how the the results whould appear in the GUI. Do you want to populate a text field?

댓글을 달려면 로그인하십시오.

답변 (2개)

Huseyin
Huseyin 2014년 2월 28일
편집: Huseyin 2014년 2월 28일
I tried to use "static text" but the datas in the result of that function is not so short to display in static text. I need to create a new window to display the results. In that new window, there should be a large text field (only the datas in result will be shown, no other buttons will be used.)

Jorge
Jorge 2014년 4월 14일
편집: per isakson 2015년 7월 6일
Hi, this solved the problem for me,
clc;
diary('example')
diary on;
%COMMANDS YOU WANT TO BE SHOWN IN THE COMMAND WINDOW
disp(array);
pretty(function);
%&THEN
diary off;
output=fileread('example');
%FINALLY
set(handles.editbox1,'string',output);
delete('example');%OPTIONAL
%END
I hope this was helpful, Good Luck.

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by