Skip to content

FAQ: how to quickly check that CasADi is working

András Retzler edited this page Nov 10, 2022 · 2 revisions

In MATLAB

>> casadi.MX

ans = 

0x0

If you get 0x0, it's working.

>> casadi.MX
Unable to resolve the name casadi.MX.

If you get an error message, it's not working.

In python

>>> import casadi
>>> casadi.MX()
MX(0x0)

If you get MX(0x0), it's working.

>>> import casadi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'casadi'

If you get an error message like this (or some other error message), then it didn't work.

What to try next

Try to run one of the examples here:

https://github.com/casadi/casadi/tree/master/docs/examples/python https://github.com/casadi/casadi/tree/master/docs/examples/matlab

Clone this wiki locally