登录论坛

查看完整版本 : [求助]如何在realtime workshop中使用已经生成的mex函数?


chenkanwu
2008-03-17, 23:42
已经在VC中编写了mex文件,并且已经在matlab中编译生成了mex函数。
在simulink的normal模式(mex函数通过MATLAB Fcn调用)下使用外部mex函数没有什么问题,可是当我想在simulink中使用实时仿真时,他说real time workshop不支持MATLAB Fcn模块,我就试了试matlab embedded function。 但是在建立实时模型时出现了下列错误(函数为timestwo)
Failed to eliminate a use of the MATLAB function 'timestwo'.
For non-simulation builds, uses of unsupported MATLAB functions are eliminated if they do not effect the function outputs.
Function 'Embedded MATLAB Function' (#58.152.163), line 5, column 5:
"timestwo(u)"

怎么办啊?如何在realtimeworkshop中能够调用mex函数啊?十万火急啊!谢谢啦!