Need To call ODE45 from java, it shows an error "Could not convert Java argument of type "com.mathworks.engine.FutureResult" to MATLAB type"
Mostrar comentarios más antiguos
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.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!