MATLAB: Am I unable to save the figure in MATLAB 7.0.4 (R14SP2) after I use the View Layout Grid from the Tools menu

"rh"andargumentargumentsfiguregridlayoutMATLABmaybemethodsmorenotoneorothers)outputsavesaveas

I plot a figure, and select the Tools -> View Layout Grid option. When I try to save the figure, I receive the following error message:
One or more output arguments not assigned during call to
'C:\MATLAB704\toolbox\matlab\scribe\@scribe\@scribegrid\methods.m(methods)'.
I cannot save the figure, even after returning to the default figure by deselecting the 'View Layout Grid' option again.

Best Answer

This bug has been fixed in MATLAB 7.2 (R2006a). For previous product releases, please read below for possible workarounds:
A bug in MATLAB 7.0.4 (R14SP2) prevents saving a figure after the Layout View Grid option has been applied.
As a workaround, you can issue the following code before saving the figure:
hS=handle2struct(gcf);
h=struct2handle(hS,0);
This will create a new figure, which can be saved by selecting Save from the File menu or by using the HGSAVE(h,'myFig.fig') command. NOTE: this new figure will not contain a Layout Grid.