フィルターのクリア

GUI produces plot in a separate window

9 ビュー (過去 30 日間)
ahmed lamak
ahmed lamak 2016 年 8 月 30 日
コメント済み: ahmed lamak 2016 年 8 月 30 日
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

採用された回答

Ixxat
Ixxat 2016 年 8 月 30 日
delete the line figure(1); figure(1) - This is forcing Matlab to plot your output a pop up window.
  1 件のコメント
ahmed lamak
ahmed lamak 2016 年 8 月 30 日
OMG thank you so much, i've spent hours trying to figure this out!!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by