MATLAB 2010a surf bug? Can someone try to replicate?

  • Context: MATLAB 
  • Thread starter Thread starter mikeph
  • Start date Start date
  • Tags Tags
    Bug Matlab
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
4 replies · 3K views
mikeph
Messages
1,229
Reaction score
18
Hello,

anyone with MATLAB 2010a would you be able to type the few lines of code into try to replicate this problem I am having?

Code:
>> p = rand(400);
>> surf(p)

Once you get the image, maximise the window and rotate the axis until you are looking vertically down (z-axis out the screen). Then zoom into the bottom left corner, and try to pan.

When I do this, rather than 'grabbing' the image and moving it, the image stays in the same place and the frame gets moved to cover part of the image up. I then get the accompanying error messages pop up:

Code:
? Cell contents reference from a non-cell array object.

Error in ==> pan>locWindowButtonUpFcn at 486
        if ~isequal(newlim{1},origlim{1})

Error in ==> hgfeval at 63
        feval(fcn{1},varargin{:},fcn{2:end});

Error in ==> uitools.uimode.modeWindowButtonUpFcn at 44
hgfeval(newButtonUpFcn,hFig,evd);

Error in ==> uitools.uimode.modeControl>localModeWindowButtonUpFcn at 144
hThis.modeWindowButtonUpFcn(hFig,evd,hThis,newValue);
 
? Error while evaluating figure WindowButtonUpFcn

[PLAIN]http://img820.imageshack.us/img820/945/matlaberror.jpg

Sometimes this happens, sometimes it doesn't. I tried it three times with this example, and the error messages only came up twice. The second time I tried it, it seemed to work fine.

Any idea what I'm doing wrong, or if it's a MATLAB error?

Thanks,
 
Last edited by a moderator:
Physics news on Phys.org
Hey, I had similar problems quite a while ago, but this should help.

axis vis3d

Pretty sure that the problem arises from MATLAB trying to "refit/rescale" the figure as you rotate it. vis3d tells it to leave it scaled for 3d rotation.

give it a try
 
Thanks, that definitely did something, but I am still unable to pan properly.
 
I want a surf to get images from many angles, and am having particular trouble doing this in the case that I am looking straight down onto it.