Need To call ODE45 from java, it shows an error "Could not convert Java argument of type "com.mathw​orks.engin​e.FutureRe​sult" to MATLAB type"

import com.mathworks.engine.*;
public class Main{
public static void main(String[] args) throws Exception{
double startTime = System.currentTimeMillis();
// for (int x = 1; x < 10; x++) {
ODE ode = new ODE ();
MatlabEngine eng = MatlabEngine.startMatlab();
double [] time = {0, 10};
Future<Object> a = eng.fevalAsync("ode45", ode.getEquation(0.3, 0.4), time, 10);
eng.close();
// }
double endTime = System.currentTimeMillis();
double searchTime = endTime - startTime;
System.out.println("Computational time " + searchTime);
}
}

Respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 1 de Mayo de 2019

Editada:

el 1 de Mayo de 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by