java.lang.Double is an object wrapper around the Java double builtin data type. Arrays of java.lang.Doubles cannot be used as arguments to methods that expect double[].
To call methods with these signatures, use a MATLAB array of doubles:
ma = [11 12];
b = mySum.sum(ma)
This returns the expected result:
Note that the argument is converted automatically, as the array "ma" above, is passed by value.
For more information about the passing data to Java functions from MATLAB see the link below.
Passing Built-In Types :: Using Sun Java Classes in MATLAB (External Interfaces)
For more information about the differences between double and java.lang.Double, refer to a Java resource.
Best Answer