|
"Muhammad " <mwasif_ciit@yahoo.com> wrote in message <i5lih5$f8b$1@fred.mathworks.com>...
> "Sean " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <i5lht2$4es$1@fred.mathworks.com>...
> > "Muhammad " <mwasif_ciit@yahoo.com> wrote in message <i5lhdg$2ul$1@fred.mathworks.com>...
> > > I have a variable in the MATLAB workspace (variable from ***.m file) and I want to pass this variable to a function in my GUI.
> > >
> > > How do I achieve this task?
> >
> > hints:
> > help getappdata
> > help setappdata
>
>
> Can you put up a simple example?
In the command window or in a script:
>>setappdata(0,'var1',var1); %Set var1 to be called 'var1' and in the root directory
In the GUI:
>>var1 = getappdata(0,'var1'); %retrieve var1
|