When a method of a class derived from coder.ExternalDependency
defines
the interface to an external function, you call the external function
by calling the method.
Suppose you define the following method for a class named AdderAPI
:
function c = adder(a, b) coder.cinclude('adder.h'); c = 0; c = coder.ceval('adder', a, b); end
adder
which has two inputs, a
and b
.
In your MATLAB® code, call adder
this way:y = AdderAPI.adder(x1, x2);