| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
inferiorto('class1','class2',...)
inferiorto('class1','class2',...) establishes that the class invoking this function in its constructor has lower precedence than the classes in the argument list. MATLAB uses this precedence to determines which method or function MATLAB calls in any given situation.
Use this function only from a constructor that calls the class function to create objects (classes defined before MATLAB 7.6).
Specify class precedence.
Suppose a is an object of class class_a, b is an object of class class_b, and c is an object of class class_c. Suppose the constructor method of class_c contains the statement:
inferiorto('class_a')This function call establishes class_a as taking precedence over class_c for function dispatching. Therefore, either of the following two statements:
e = fun(a,c); e = fun(c,a);
Invoke class_a/fun.
If you call a function with two objects having an unspecified relationship, the two objects have equal precedence. In this case, MATLAB calls the method of the left-most object. So fun(b, c) calls class_b/fun, while fun(c, b) calls class_c/fun.
![]() | Inf | info | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |