如果需要把比如说image processing, neural network等,需要用Matlab提供的基本函数改写这些代码(似乎很麻烦,所以尽量开发的时候使用Simulink)。
以下工具箱,可以通过RTW转换:
Aerospace Blockset
Arithmetic operators
Casting
Complex numbers
Derivative and integral
Discrete math
Exponential
Filtering and convolution
Fixed-Point Toolbox
HDL code generation
Histogram
Input and output
Interpolation and computational geometry
Logical operators
Matrices and arrays
Polynomials
Relational operators
Rounding and remainder
Set
Signal processing
Special values
Specialized math
Statistics
String
Structure
Trigonometry
%回答的补充问题,假设下面是你的函数
function y = foo(u,v) %#eml
s = single(u);
d = double(v);
y = double(identity(s)) + identity(d);
function y = identity(u) %#eml
y = u;
命令行下输入:
emlc -T rtw:lib -O disable:inline foo
直接编译中间有生成c语言的