Effacer les filtres
Effacer les filtres

GUI produces plot in a separate window

9 vues (au cours des 30 derniers jours)
ahmed lamak
ahmed lamak le 30 Août 2016
Commenté : ahmed lamak le 30 Août 2016
I am extremely new to creating a GUI. I have a GUI which produces a plot on a separate window.
I have created a function in a script which takes a recurrence relation on loop to produce an output. using this output i have the following lines in my code
figure(1);
plot(real(eig(T)),'r*') ;
xlabel('x');
ylabel('y');
t1 = [ 'Display of Eigenvalues n=' num2str(n) ];
title(t1);
In my GUI script i have the following;
function solve_Callback(hObject, eventdata, handles)
% hObject handle to solve (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
a = str2num(get(handles.input1_editText,'String'));
b = str2num(get(handles.input2_editText,'String'));
n = str2num(get(handles.input4_editText,'String'));
d = str2num(get(handles.input5_editText,'String'));
e = str2num(get(handles.input6_editText,'String'));
w = str2func(get(handles.input3_editText,'String'));
method(a,b,n,d,e,w);
c=toc
set(handles.Time,'String',c);
guidata(hObject, handles);
This is just the push button output of my GUI.
This produces a figure output based on the function which is called method, but it creates a figure in a separate window, i have tried for several hours however cant figure out how to get this same output inside my GUI in the axies part.
Thank you

Réponse acceptée

Ixxat
Ixxat le 30 Août 2016
delete the line figure(1); figure(1) - This is forcing Matlab to plot your output a pop up window.
  1 commentaire
ahmed lamak
ahmed lamak le 30 Août 2016
OMG thank you so much, i've spent hours trying to figure this out!!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by