Date: May 8, 2013 2:09 PM
Author: Steven Lord
Subject: Re: MATLAB Concatenation Rules for objects

<kzelechowski@e3tech.local> wrote in message
> class (handle (0)) == 'root';

The HANDLE function is undocumented. [The HANDLE _class_ is Abstract and so
cannot be instantiated, so this can't be a call to instantiate an object
using 0 as an input parameter. You must inherit from it to instantiate a
handle object.]

> class (libpointer) == 'lib.pointer';

Yes, libpointer returns a lib.pointer object.

> class ([ libpointer, (handle (0)) ]) == 'handle';
> % Why? The documentation says: MATLAB does not convert objects to a
> common superclass unless those objects derive from a member of a
> heterogeneous hierarchy.

You're calling out one of the four bullets in this section of the
documentation, the last one:

There are other bullets that apply to general concatenation of objects.

> % This is not the case:
> isa (libpointer, 'math.mixin.Heterogeneous') == 0;

The name of the base class used to construct a heterogeneous hierarchy is
not math.mixin.Heterogeneous. It is matlab.mixin.Heterogeneous.

> % So what is going on here? Moreover:
> numel (superclasses (libpointer)) == 0;
> numel (superclasses (handle (0))) == 0;
> % So if they were heterogeneous, the superclass would be hidden. I am not
> sure how to test for that.

What specifically are you trying to do? Why are you attempting to use
lib.pointers and the HANDLE function? What's your application?

Steve Lord
To contact Technical Support use the Contact Us link on