import Matlab.SNDistribution;
import com.mathworks.toolbox.javabuilder.*;
public class TestMain {
public static void main(String[] args) throws MWException{
Object []result=null;
SNDistribution snd =new SNDistribution();
result=snd.snDistribution(1);
System.out.println(result[0]);
snd.dispose();
snd=null;
}
}
出现如下错误:
??? Undefined function or method 'int' for input arguments of type 'char'.
Exception in thread "main" ... Matlab M-code Stack Trace ...
file C:\Documents and Settings\Duel\Local Settings\Application Data\MathWorks\mcr_cache_v78\Matlab_36C5C4F40B1C3A1A261115697D751C0E\work\snDistribution.m,name snDistribution,line at 4.
com.mathworks.toolbox.javabuilder.MWException: Undefined function or method 'int' for input arguments of type 'char'.Error in =>snDistribution.m at 4
at com.mathworks.toolbox.javabuilder.internal.MWMCR._mclFeval(Native Method)
at com.mathworks.toolbox.javabuilder.internal.MWMCR.mclFeval(MWMCR.java:110)
at com.mathworks.toolbox.javabuilder.internal.MWMCR.access$600(MWMCR.java:26)
at com.mathworks.toolbox.javabuilder.internal.MWMCR$5.mclFeval(MWMCR.java:908)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.mathworks.toolbox.javabuilder.internal.MWMCR$4.invoke(MWMCR.java:806)
at $Proxy0.mclFeval(Unknown Source)
at com.mathworks.toolbox.javabuilder.internal.MWMCR.invoke(MWMCR.java:509)
at Matlab.SNDistribution.snDistribution(SNDistribution.java:208)
at com.mhi.action.TestMain.main(TestMain.java:28)