Search code examples
matlaboctavesimulink

Can GNU Octave run simulink model?


From what I understand, GNU Octave can run functions in .m files. Can it run simulink models too?

For example, doing this in an m file:

rv = sim('simulink_model.slx');
rv.Output.Data

And perhaps call this from Octave? I'm unable to try this myself because I don't have simulink.


Solution

  • No, not natively. You would need to use Scilab xcos and the Sci cosim Octave toolbox to communicate with it from Octave (see the docs) or run it directly from Scilab.

    Even then I believe you'd need to re-write your Simulink models, one comparison can be found here:

    http://x-engineer.org/xcos-vs-simulink-continuous-time

    And the official xcos docs can be found here:

    https://www.scilab.org/software/xcos