MATLAB/Simulink model simulation and modeling with s-functions and variable-step solver

Well, if you continue to use Matlab solvers you need a Matlab license. But you will get the advantages of Julia only if you do NOT use the Matlab solvers but the DifferentialEquations.jl package. There are two different types of FMUs, FMU for co-simulation and FMU for model export (FMI Standard: Co-Simulation vs. Model Exchange FMUs). You will get the advantages of Julia only if you use an FMU for model export, because only then the Julia solvers will be used.

I cannot comment on your question regarding the s-functions.

I re-wrote a Simulink model (three A3 pages in printed form) in ModelingToolkit (Julia) and it had only
a length of half an A4 page and was 1000 times faster.

3 Likes