Converting Matlab ode45 into C with complex output
Mostra commenti meno recenti
I tried using the Matlab coder tool in order to export my ode solver to C (hoping that I might get a run-time boost).
Since I am solving a Schrodinger equation my output should be a complex vector.
When I'm running my regular Matlab code, everything works just fine, but when the coder tool runs the check of the mex file, it returns an error - "the output data must be real when enforcing non-negativity...".
I couldn't find a place where it is stated that the Matlab coder can only convert ode45 with real input/output.
If it's not obvious, I didn't request the output to be real. I also tried defining both the input and the output as complex, and it didn't help.
Any suggestions?
Risposte (1)
Torsten
il 20 Nov 2017
0 voti
"the output data must be real when enforcing non-negativity...".
But you seem to use the non-negativity option of ODE45 which doesn't make sense for complex output.
Best wishes
Torsten.
Categorie
Scopri di più su Ordinary Differential Equations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!