Borrar filtros
Borrar filtros

GUI produces plot in a separate window

9 visualizaciones (últimos 30 días)
ahmed lamak
ahmed lamak el 30 de Ag. de 2016
Comentada: ahmed lamak el 30 de Ag. de 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

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by