|
Hello to everyone,
I want to run independent Matlab programs:
1. plot sin x
code:
clear all
clc
global stopr
i=0;
x=0;
stopr=0;
while 1-stopr
i=i+1;
xdin=i*0.1;
drawnow
x=[x xdin];
y=sin (x);
hstop=uicontrol (gcf,'String','Stop','Position',[10,10,60,20],'Callback','stoprun');
plot(x,y)
end
2. plot cos x
The same, but y = cos (x).
When I open the two matlab programs and run the independent process sin and cos, in my desktop appear two boxes (figure1 and figure 1) at the botton generated for the two matlab programs respectively.
Clicking on one of them, for example (sin x), appear the figure showing the evolution of sin x in time.
If now, click on the another one, appear the other figure with cos x.
It is trivial up to now.
My question is: I am interested to do it with a GUI pannel with two bottons,
then cliking on them I would like to visualize one or another process.
How I can do it?
I have to run another matlab process to run this GUI pannel, and try to connect the two process (sin and cos) with the control panel?
Is it possible?
Thanks in advance.
Jose.
|