From: Patrik on
"Harley " <harley.h.cudney(a)us.army.mil> wrote in message <g7eomr$poq$1(a)fred.mathworks.com>...
> Ok, but how would I store that data into a variable in the
> workspace. All this is doing is storing into a handle
> inside a function. When I am outside of the function the
> value read into the edit box is still not recorded in my
> workspace.
>
> what I have now under the callback is
>
> handles.id = get(hObject,'String')
> geomodel_id=guidata(hObject)
>
> what am I missing???
>
> "Rick Rosson" <no.spam(a)spammer.abc> wrote in message
> <g7d6j6$7iv$1(a)fred.mathworks.com>...
> > Try storing the values in fields of the "handles"
> structure. For example:
> >
> > handles.aStr = ...
> > handles.another = ...
> > etc.
> >
> > Then make sure to update the handles structure by calling:
> >
> > guidata(hObject, handles);
> >
> > just before the end of the function where you create or
> update any of its
> > fields.
> >
> > HTH.
> >
> > Rick

I think the function assignin is what you are looking for!