Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Display of MATLAB workspace variable into GUI funcion

Subject: Display of MATLAB workspace variable into GUI funcion

From: Muhammad

Date: 1 Sep, 2010 12:37:04

Message: 1 of 5

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?

Subject: Display of MATLAB workspace variable into GUI funcion

From: Sean

Date: 1 Sep, 2010 12:45:22

Message: 2 of 5

"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

Subject: Display of MATLAB workspace variable into GUI funcion

From: Muhammad

Date: 1 Sep, 2010 12:56:05

Message: 3 of 5

"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?

Subject: Display of MATLAB workspace variable into GUI funcion

From: Sean

Date: 1 Sep, 2010 13:05:29

Message: 4 of 5

"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

Subject: Display of MATLAB workspace variable into GUI funcion

From: Muhammad

Date: 1 Sep, 2010 14:26:22

Message: 5 of 5

"Sean " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <i5lj2p$kg8$1@fred.mathworks.com>...
> "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

I am sending you e mail on the address (sean.dewolski@nospamplease.umit.maine.edu)
Please check that mail.
thanks

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us