Converting Matlab ode45 into C with complex output
古いコメントを表示
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?
回答 (1 件)
Torsten
2017 年 11 月 20 日
0 投票
"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.
1 件のコメント
Daniel Cohen
2017 年 11 月 20 日
カテゴリ
ヘルプ センター および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!