Programming |
Overloading Functions
You can overload any function by creating a function of the same name in the class directory. When a function is invoked on an object, MATLAB always looks in the class directory before any other location on the search path. To overload the plot
function for a class of objects, for example, simply place your version of plot.m
in the appropriate class directory.
Examples of Overloaded Functions
See the following sections for examples of overloaded functions:
Overloading Operators and Functions | Example -- A Polynomial Class |
© 1994-2005 The MathWorks, Inc.