MATLAB: Do I receive an error when I zoom out on a region outside an axes in MATLAB 7.0.1 (R14SP1)

axesclickcontextmenuguiguideMATLABrightzoom

I created a GUI using GUIDE in MATLAB 7.0.1 (R14SP1). The GUI contains an "axes" object and has the following code in its "OpeningFcn", which creates a plot inside the axes:
plot(1:10,'parent',handles.axes1)
zoom on
When I run the GUI, if I right-click (or Ctrl+click in Mac OS X) outside the axes and select "Zoom Out" from the contextmenu I receive the following error:
??? Error using ==> eq
Matrix dimensions must agree.
Error in ==> zoom>localUIContextMenuCallback at 475
applyzoomfactor(hZoom,findaxes(hZoom),.9);
??? Error while evaluating uimenu Callback.

Best Answer

This bug has been fixed in MATLAB 7.0.4 (R14SP2). For previous releases, please read the following for possible workarounds:
We have verified that there is a bug in MATLAB 7.0.1 (R14SP1) in the way the ZOOM function handles "uicontextmenus".
To work around this issue, replace your current zoom.m, with the zoom.m attached to this solution. To do this, follow the steps below:
1. Quit MATLAB
2. Rename the following file to zoom_old.m
$MATLAB\toolbox\matlab\graph2d\zoom.m
(where $MATLAB is the MATLAB root directory on your machine, as returned by typing the following at MATLAB command prompt:
matlabroot
3. Download the file attached to this solution. Place the new zoom.m in the same directory mentioned in step 2.
4. Restart MATLAB
5. After restarting MATLAB, execute the following command at the MATLAB command prompt:
rehash toolboxcache