From: Nick Mariette on
For the record... I was also getting an "invalid object handle" error when using mesh.
I had a script with a mesh overlaid on a scatter3 plot, and it would work in a fresh Matlab, but after a while it seemed to fail and I couldn't pin down how or why.

I think I fixed it with the help of this post:
http://www.mathworks.com/matlabcentral/newsreader/view_thread/274193
- which noted that this problem happened when using "close all".

I was indeed using "close all" in my script, and when I removed it, so far I have not had the "invalid object handle" error.

So have a look for close all functions. There are other posts out there with some other solutions to do with the NextPlot property, but these didn't help for me.

good luck.
Nick

mikedewar <mikedewar(a)gmail.com> wrote in message <1176800550.401281.36650(a)d57g2000hsg.googlegroups.com>...
> On Apr 17, 9:15 am, mikedewar <mikede...(a)gmail.com> wrote:
> > Hi,
> >
> > Look:
> >
> > a=[1:100]; b=[1:100]; C=rand(100,100);>> surf(a,b,C);
> >
> > ??? Error using ==> getappdata
> > Invalid object handle.
> >
> > Error in ==> surf at 97
> > hh = double(graph3d.surfaceplot(args{:},'parent',parax));
> >
> > The annoying thing is that the surface plots fine before the error is
> > generated.
> >
> > My details:
> > OSX 10.4.9
> > Processor 1.83 GHz Intel Core 2 Duo
> > Matlab 7.4.0.287 (R2007a)
> >
> > If anyone knows how to fix this (either suppress the error or make it
> > not happen in the first place) I'll be eternally grateful.
> >
> > In addition to the above bug, I generated some surfaces in the
> > previous version of matlab for my PhD thesis, then my iBook died and
> > now I'm borrowing a macBook with the new Matlab on it and it won't
> > open the figure files I had carefully saved. I'm guessing the problem
> > has the same root. Here's what happens if I open the old fig file:
> >
> > open IDE_response_5.fig
> > Warning: Unrecognized object type: graph3d.surfaceplot.> In hgload at 164
> >
> > In openfig at 78
> > In open at 146
> >
> > then it gives me a plot which consists of four squares which seem to
> > be coloured using the colormap which was saved with the figure files
> > originally: copper!
> >
> > If anyone can suggest an alternative to Matlab for scientific
> > computing then this would also make me happy. I'm sick to the back
> > teeth of this barely cobbled together program. It seems such a shame
> > that these incredible tools have to be wrapped up in such a crappy
> > IDE, especially for the price paid for the software. I'm starting to
> > resent the Matlab monopoly in my discipline... I wonder why Mathworks
> > find it so hard to write an IDE for matlab on the mac?
> >
> > Thanks in advance for any help..
> >
> > Mike Dewar
>
>
> For some reason, using `surface' instead of `surf' seems to work fine.
> Digging around in surf.m hints at new ways of drawing things in the
> new ver...
>
 | 
Pages: 1
Prev: object handles
Next: cell shape measurement