Info
This question is closed. Reopen it to edit or answer.
How to make .fig files private?
1 view (last 30 days)
Show older comments
Hello all.
I created a 'private' folder and put all my functions called by the main program to that folder. It works well with functions that have no GUI or with functions whose GUI are developed purely by coding. But it fails with GUIs developed by GUIDE, which contain both .m files and .fig files.
Take 'general_plot_demo.m' as an example. It is developed by GUIDE, and has a corresponding .fig file.
When I try to run it, error massage comes out like this:
Error using load
Unable to read file 'general_plot_demo.fig'. No such file
or directory.
Since I want to load .fig files while do not want .fig files to be seen from outside, could there be a proper way to make .fig files private?
Thank you very much!
0 Comments
Answers (1)
Cindy Solomon
on 22 Apr 2015
Hi Han,
This is a limitation of MATLAB wherein GUI's in a private directory or directories starting with '@' do not work properly even if the full path information is used. This is due to the fact that MATLAB files under a private directory can only be seen by MATLAB code in function files immediately above the private directory. Callbacks (including CreateFcn) do not work properly both in startup and when running. To work around this issue, place the MATLAB file and the FIG file in a directory that is on your MATLAB path.
0 Comments
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!