How to generate code from a MATLAB function containing 'import' statement?

58 Views Asked by At

I am trying to generate C code from a MATLAB code using MATLAB Coder. The MATLAB code is an MPC controller and uses CasADi, and therefore there is an 'import' statement to import casadi functions. So, MATLAB Coder gives an error that import statements are not supported for code generation. But if I delete the import statement, the code will not work as it won't have access to casadi.

Is there somehow a way to generate C code from this function?

If not, is there any other way to use CasADi functions without using 'import' ? (And without having to change the entire MATLAB code)

Thanks very much.

0

There are 0 best solutions below