I am using the MATLAB Java interface to pass data from MATLAB into a Java method I am calling. For example, I might try the following code:
data = rand(1,5000000);myobject = MyClass;myobject.myMethod(data)
However, for some data arrays, the call fails and MATLAB returns the following error:
??? Java exception occurred: java.lang.NullPointerException at MyClass.myMethod(MyClass.java:13)
Best Answer