I’m sorry to interrupt your morning/afternoon/evenning, but I need some help to convert a code written in Matlab into Julia. However, I cannot figure out where/why/how is going wrong
I have a code to my research with some coupled Differential Equations that in Matlab + ODE45, that are working as expected. My goal is to speed up the code using Julia +
After much debugging, I guarantee that the first initialization provides equal final results. After that, I need help.
Maybe is the style of coding that I have to change ? Maybe I have to use to stiff option of
DifferentialEquations.jl? Maybe my equations are simple unstable ? Maybe is my desktop ?
Because the code is extensive to show in this post, you can download from here.
Note: During the debugging (I cannot explain why), but in Julia version the matrix
ZMM at line 100 sometimes were not created. I could not displayed on debug mode, nether I could see it in workspace variables panel. I believe to be a bug of the debugger, but maybe this information is relevant
julia> versioninfo() Julia Version 1.3.0 Commit 46ce4d7933 (2019-11-26 06:09 UTC) Platform Info: OS: Linux (x86_64-pc-linux-gnu) CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-6.0.1 (ORCJIT, haswell) Environment: JULIA_EDITOR = atom -a JULIA_NUM_THREADS = 4
Thank you for any suggestion