Overloaded Functions
Overloaded functions are useful when you need to create a function
that responds to different types of inputs accordingly. For instance,
you might want one of your functions to accept both double-precision
and integer input, but to handle each type somewhat differently. You
can make this difference invisible to the user by creating two separate
functions having the same name, and designating one to handle double types
and one to handle integers.
MATLAB overloaded functions reside in subdirectories having
a name starting with the symbol @ and followed
by the name of a recognized MATLAB class. For example, functions
in the \@double directory execute when invoked
with arguments of MATLAB type double. Those
in an \@int32 directory execute when invoked with
arguments of MATLAB type int32.
See Overloading MATLAB Functionsfor
more information on overloading functions in MATLAB.
 | Private Functions | | Using Objects |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit