问题1:与其他版本不同的生成过程
(1)、应用程序点击MATLAB Coder
(2)、添加文件,录入输入参数,N = 10;F = [0,0.2,0.3,1],M = [1,1,0,0]
(3)、输入名字,类型
(4)、编译则可生成
问题2:各种错误
(1)、The function 'sigcasttofloat' is not supported for standalone code generation
对输入的限制,感觉用途不大,直接删除
(2)、Undefined function or variable 'message'.
用于表达错误,然后打印的么?直接删除
(3)、Undefined function or variable 'firchk'.
用于判断N值,后续没应用,直接删除
(4)、Variable 'b0' is undefined on some execution paths
Variable 'I1' is undefined on some execution paths.
Variable 'I2' is undefined on some execution paths.
Variable 'G' is undefined on some execution paths.
原因是在c中需要初始化,因此加入变量初始化
3、编译成功,点击View report即可。