package matlab;
import com.mathworks.toolbox.javabuilder.*;
import com.eigenface.Eigenface;
public class Test {
public static void main(String[] args) {
Eigenface core = null;
Object [] result = null;
try {
core = new Eigenface();
result = core.EigenFace(2);
System.out.println(result[0]);
} catch (MWException e) {
e.printStackTrace();
}
}
}
I’m using a Matlab function in a wrapper class, called Eigenface. When I run my code i get this exception: {??? Error using ==> EigenFace
Too many output arguments.
} .
Since the function works with no problem in Matalab, does anyone knows why am I getting this exception?
I believe this call in your code is not correct:
Is the name of your MATLAB function
EigenFace? If not, you should be calling something like:You can see the example getmagic.java in MATLAB documentation: