How can i use the static box in one .m to another using set(handles)?

A gui was created and named as A.m
A.fig have static box and axes
A.fig can open another .fig file named as new.fig. Inside this new.fig is to import files. After importing i want to close the new.fig and set the A.m static box with a string of "1234" and the set axes will visible.
set(handles.star,'string','1234');
set(handles.axes1,'visible',on);
I added those code above in new.m file. It give error of
Reference to non-existent field 'start'.
Reference to non-existent field 'axes1'.
Do anyone can help me? How am i suppose to do to enable the static box and axes can be called in another .m file?

2 Comments

I see one "star" and one "start". Is this a typo?
Yes,sorry I typo when copying. It should be start*

Sign in to comment.

 Accepted Answer

3 Comments

Thank you for answering. The link above is about sharing data, I not sure is mine consider as sharing data? Because I want to code in order to change the static box value and plot the axes by writing the codes in new.m while the static box and axes are in A.fig?
Data is basically anything. The handle IDs of your controls can be considered data. You need to share the handle IDs of the controls (pushbuttons, listboxes, sliders, whatever). See the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.28s.29.3F By the way, it's harder to share between two separate GUIs than between functions contained in the same GUI or m-file.
I think i solved the problem. Thank you for the help.

Sign in to comment.

More Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Asked:

tan
on 1 Jun 2014

Commented:

tan
on 2 Jun 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!