Calling fft from JAVA code does not work
Afficher commentaires plus anciens
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!
Réponses (0)
Catégories
En savoir plus sur Deploy to Java Applications Using MWArray Data API dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!