The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: MATLAB Concatenation Rules for objects
Replies: 4   Last Post: May 9, 2013 9:41 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Lord

Posts: 18,038
Registered: 12/7/04
Re: MATLAB Concatenation Rules for objects
Posted: May 8, 2013 2:09 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

<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

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.