查看单个帖子
旧 2008-03-17, 23:42   #1
chenkanwu
初级会员
 
注册日期: 2008-03-17
年龄: 40
帖子: 2
声望力: 0
chenkanwu 正向着好的方向发展
默认 [求助]如何在realtime workshop中使用已经生成的mex函数?

已经在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函数啊?十万火急啊!谢谢啦!
chenkanwu 当前离线   回复时引用此帖