emailing gui code

2 views (last 30 days)
777
777 on 11 Mar 2012
i designed a GUI using GUIDE and emailed .m file to my friend. but he is not able to view the results
even when i tried to copy and paste the contents of mailed .m file ,i got the following error.
??? Error using ==> load Unable to read file unit5.fig: No such file or directory.
Error in ==> hgload at 43 fileVars = load(filename,'-mat');
Error in ==> openfig at 72 [fig, savedvisible] = hgload(filename, struct('Visible','off'));
Error in ==> gui_mainfcn>local_openfig at 286 gui_hFigure = openfig(name, singleton, visible);
Error in ==> gui_mainfcn at 159 gui_hFigure = local_openfig(gui_State.gui_Name, gui_SingletonOpt, gui_Visible);
Error in ==> unit5 at 42 gui_mainfcn(gui_State, varargin{:});
is there something else also,that i need to send.??
regards

Accepted Answer

Walter Roberson
Walter Roberson on 11 Mar 2012
You need to send unit5.fig as well.
GUIDE generates two files: a .m file and a .fig file. Neither part is meaningful without the other.
There is an option in GUIDE to generate pure .m code that builds the figures and controls at run time. That would result in a single (larger) .m file that could be emailed.

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!