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
|
|
0
|
|
|
|
Reply
|
Vivek
|
11/15/2010 8:30:07 PM |
|
"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'
Hints:
doc setappdata
doc getappdata
|
|
0
|
|
|
|
Reply
|
Sean
|
11/15/2010 10:40:08 PM
|
|
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
|
|
0
|
|
|
|
Reply
|
Vivek
|
11/16/2010 7:36:04 PM
|
|
You made this nice GUI for your user, and then when you exit you're
going to force the user to interact with MATLAB command line functions
in the "interpreter" (command window)? Why do this to them? Just
handle everything in the GUI.
If you still insist on making it less convenient for your users, then
take a look at evalin() and assignin().
|
|
0
|
|
|
|
Reply
|
ImageAnalyst
|
11/16/2010 10:56:00 PM
|
|
Well I completely understand your reply, its the whole point of making a GUI,
but right now I am the only user and I wrote the GUI to make analysis for me easier faster and also to gain GUI programming experience along side.
So once again yes , my intention is once the GUI is exited as you mention rightly, I want to be able to access the variable output uv in the interpreter?
I will try evalin and asisignin
Thanks
ImageAnalyst <imageanalyst@mailinator.com> wrote in message <4ea16389-fa96-43da-bb24-4c72e7de9dbc@s5g2000yqm.googlegroups.com>...
> You made this nice GUI for your user, and then when you exit you're
> going to force the user to interact with MATLAB command line functions
> in the "interpreter" (command window)? Why do this to them? Just
> handle everything in the GUI.
>
> If you still insist on making it less convenient for your users, then
> take a look at evalin() and assignin().
|
|
0
|
|
|
|
Reply
|
Vivek
|
11/17/2010 2:22:04 AM
|
|
|
4 Replies
238 Views
(page loaded in 0.061 seconds)
Similiar Articles: Re: Writing Temporary DB2 Tables From SAS Enterprise Guide - comp ...Writing Temporary DB2 Tables From SAS Enterprise Guide - sas sas, Writing Temporary DB2 Tables From SAS Enterprise Guide . comp.soft-sys.sas - The SAS ... GUIDE gui handles visibility to user defined function - comp.soft ...RE. Guide - comp.soft-sys.matlab GUIDE gui handles visibility to user defined function - comp.soft ... RE. Guide - comp.soft-sys.matlab GUIDE gui handles visibility to ... drawing on a matlab figure in guide - comp.soft-sys.matlab ...But I cannot figure out how to simply click on a ... mouse movement Script - comp.soft-sys.matlab RE. Guide ... • Getting Started • User's Guide • ... Question on the usage of SetAppData - comp.soft-sys.matlab ...Post Question | Groups ... GetSlice where you're calling it from and use setappdata ... ... using mouse to select a point on an axes in GUIDE - comp.soft-sys ..... Post Question ... Enterprise Guide: Clear/ Export project log automatically - comp ...Is there a way to export and clear Project log automatically (as a step) in Enterprise Guide? I am using Enterprise Guide version 4.1, hot fix 14. ... Guide: Set handles out of closerequestfcn - comp.soft-sys.matlab ...Hello, I created a GUI using Matlab GUIDE do read in data from Excel files. The Excel file's header is passed to a listbox from which the user can ... Best Starter Guide for Xilinx FPGA Editor? - comp.arch.fpga ...Best Starter Guide for Xilinx FPGA Editor? - comp.arch.fpga ... simulation ... Re: PDE toolbox initial condi - comp.soft-sys.matlab Re: PDE toolbox initial condi ... Locating GUIDE Gui Figure Handle/Passing Data - comp.soft-sys ...live video handles is run in other axes when doing process of ... % hObject handle to figure % eventdata reserved - to ... It looks like you're using GUIDE. New book - A Field Guide to Genetic Programming - No cost PDF ...A FIELD GUIDE TO GENETIC PROGRAMMING Riccardo Poli, William B. Langdon, Nicholas F ... Re: PDE toolbox initial condi - comp.soft-sys.matlab Re: PDE toolbox initial condi ... basic user-defined structure question - comp.lang.c++.moderated ...RE. Guide - comp.soft-sys.matlab My question is when the computational routine ... GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles ... Lake of the Ozarks real estate GuideA monthly guide of real estate listings with additional photos and virtual tours. Kingdom Hearts: Re:coded Guide & Walkthrough - Nintendo DS - IGNKingdom Hearts: Re:coded NDS Game Guide: Find walkthroughs, maps, video tips, achievements, collectibles, secrets, multiplayer strategies and more help 7/26/2012 8:37:05 AM
|