|
Here is my function from a button click callback and as you will see CSCmain is the name of my routine and it returns a variable "uv" , I want to be able to access uv in the workspace for post analysis
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
epsilon=str2double(get(handles.epsbox,'String')) ;
zetas=str2double(get(handles.zetabox,'String')) ;
vr=str2double(get(handles.vrbox,'String')) ;
lam=str2double(get(handles.lambox,'String'));
T=str2double(get(handles.periodbox,'String'));
Amp=str2double(get(handles.amplitudebox,'String')) ;
dx=str2double(get(handles.dxbox,'String')) ;
dt=str2double(get(handles.dtbox,'String')) ;
CSCgui('visible','off')
close('CSCgui')
tic
[uv]=CSCmain(epsilon,zetas,lam,vr,Amp,T,dx,dt,15,6);
end
??
"Vivek varadarajan" <v_varada@uncg.edu> wrote in message <ibs58e$6kq$1@fred.mathworks.com>...
> I created a simple GUI panel with text boxes for parameter entries and a button to run a computational routine.
>
> My question is when the computational routine is called inside the button click call back function, I want to be able to access returned variables in the interpreter for plotting analysis.
>
> for example. here is the outline of my GUI skeleton (not syntaxially written)
>
> button_call_back()
>
> output=routine(parameters extracted from text entries)
>
> end
>
> How do I access the variable "output" in the interpreter later on! Once the GUI quits after my routine returns I cannot seem to access the variable in the interpreter
|