Calling fft from JAVA code does not work
이전 댓글 표시
Hello Everyone!
I have this piece of code in a matlab function (let's call it, matfun)
time_dip= double(senyal_V')
Pyy=fft(time_dip,n);
senyal_V is an array that I get as a parameter from a JAVA function, javafun, which I create as follows:
MatlabClass objecte= new MatlabClass();
double[] arreglo = {6.2d, 6.2d, 3.2d, 4.2d, 4.2d, 6.2d};
MWNumericArray mwarreglo = new MWNumericArray(x3, MWClassID.DOUBLE);
output = objecte.matfun(1,mwarreglo,4);
mwarreglo is the same parameter as senyal_V. The tricky thing is in the execution of the matfun in JAVA code. In the .m code you see a double cast, but still doesn't work. Either by defining the parameter senyal_V, as mwarreglo or arreglo type, it doesn't work. I don't know what to do to solve this problem. What drives me crazy is that if I invoke the matfun directly in Matlab, it works, no matter how I declare this parameter.
Any suggestions?
Thanks!
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Deploy to Java Applications Using MWArray Data API에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!