Let's consider this simple Matlab script:
p=py.list([1,2,3])
disp(py.len(p))
this prints 3
.
Is it possible to generate C code for this script?
Let's consider this simple Matlab script:
p=py.list([1,2,3])
disp(py.len(p))
this prints 3
.
Is it possible to generate C code for this script?
When you say "generate C code from this script", I assume you're asking whether it's possible to use MathWorks code generation products (e.g. MATLAB Coder) to convert this script to C code.
If so then no - MATLAB Coder converts MATLAB code to C, and it only converts a subset of the MATLAB language to C. Most of the MATLAB language is covered, but there are some notable exceptions, and calls out to Python are one of them. I'm not sure whether you're hoping that you might be able to convert the Python itself to C code, or whether you're just hoping to generate C code that would call out to Python - but neither are possible.
Of course, you could
or