In MATLAB 6.0 I execute the following lines of code
figure(1);peaksuimenu(1,'label','2D','callback','view(2);axis equal')uimenu(1,'label','3D','callback','view(3);axis normal')
In the figure window notice that two tabs '2D' and '3D' get displayed. If you click on the 2D tab, a 2D plot appears in the axes. Click on 3D tab to make a 3D plot appear on the same axes. Mouse release activates the callbacks in this case.
In MATLAB 7.0 I execute the same code. Again in the figure window two tabs '2D' and '3D' appear. Click on the 2D tab to make a 2D plot appear on the axes. Now move the mouse to the 3D plot and notice that we do not have to click on 3D to make a 3D plot appear. Just switching the mouse between 2D and 3D toggles between the 2D and 3D plots in the axes.The mouse position itself activates the callbacks in this case.
Best Answer