Matlab to run SImulink with Compiled code Error
显示 更早的评论
Hello, I have a script from which I call a Simulink MOdel. Inside this Simulink model I have some blocks that were programmed and compiled with VisualC++. When I run directly the Simulink model I have no problems, but when trying to run it from the script
options = simset('SrcWorkspace','current');
sim('mymodel.mdl',[],options)
I get the following error at the end of the simulation:
??? Error due to multiple causes.
Caused by:
Could not get structure variable.
Error in 'mymodel/S-Function_dirdynared' while executing C MEX S-function
'functionmine', (mdlTerminate), at time 10. MATLAB error message:
Could not get structure variable.
Any idea what is going on? Thank you very much in advance
2 个评论
Virginia
2013-6-19
Kaustubha Govind
2013-6-19
Does it look for a certain variable in the workspace? If so, where have you defined the variable - is it in the base workspace, or the workspace of the function that you are calling the SIM command from?
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink Coder 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!