Pass Numeric Arguments
Call .NET Methods with Numeric Arguments
When you call a .NET method in MATLAB®, MATLAB automatically converts numeric arguments into equivalent .NET types, as shown in the table in Pass Primitive .NET Types.
Use .NET Numeric Types in MATLAB
MATLAB automatically converts numeric data returned from a .NET method into equivalent MATLAB types, as shown in the table in .NET Type to MATLAB Type Mapping.
Note that MATLAB preserves .NET arrays as the relevant System.Array
types, for example, System.Double[]
.
MATLAB has rules for handling integers. If you are familiar with using integer types in MATLAB, and just need a reference to the rules, see the links at the end of this topic.
The default data type in MATLAB is double
. If the data in your applications uses
the default, then you need to pay attention to the numeric outputs of your .NET
applications.
For more information, see: