现在给出一个最简单的函数 其内容为
function y = hello_world %#codegen
y = 'HelloWorld!';
直接使用命令 codegen hello_world
生成了一个叫做hello_world_mex的mex文件,使用tic和toc函数测试了一下,速度确实快一个数量级。
使用命令:codegen -config coder.config('lib') hello_world
生成的文件,读者可以自行观察
现在给出一个最简单的函数 其内容为
function y = hello_world %#codegen
y = 'HelloWorld!';
直接使用命令 codegen hello_world
生成了一个叫做hello_world_mex的mex文件,使用tic和toc函数测试了一下,速度确实快一个数量级。
使用命令:codegen -config coder.config('lib') hello_world
生成的文件,读者可以自行观察