MATLAB: Matlab Gui. Retrieve the output of a function (external .m file) within a push button. Could anyone explain how to do it

MATLAB: Matlab Gui. Retrieve the output of a function (external .m file) within a push button. Could anyone explain how to do it

matalb guiMATLAB

Hello I’m new about use the Matlab Gui. I’m struggling to retrieve the output of a function (external .m file) in a push button. Could anyone explain how to do it?
%code
function Simulate_Callback(hObject, eventdata, handles)
% hObject handle to Simulate (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global w DP
T=str2double(get(handles.inT,'string'));
P=str2double(get(handles.inP,'string'));
delta=str2double(get(handles.indelta,'string'));
Comp=str2double(get(handles.Comp,'data'));
Comp=Comp(:,1);
[w,DP]=external_Function(T,P,delta,Comp);

Best Answer

  • Thanks for your quick reply. I found my error. It was a waitbar in my external function that once completed the function it closed the entire gui
  • Add a Comment

    Your email address will not be published. Required fields are marked *