how to display results in matlab gui (text)

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 comentario

Jan
Jan el 28 de Feb. de 2014
It depends on how the the results whould appear in the GUI. Do you want to populate a text field?

Iniciar sesión para comentar.

Respuestas (2)

Huseyin
Huseyin el 28 de Feb. de 2014
Editada: Huseyin el 28 de Feb. de 2014

0 votos

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 el 14 de Abr. de 2014
Editada: per isakson el 6 de Jul. de 2015
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.

Categorías

Más información sobre Interactive Control and Callbacks en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 28 de Feb. de 2014

Editada:

el 6 de Jul. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by