Matlab Engine Library for Zero-Crossing Detection

2 次查看(过去 30 天)
Hi,
i am working with generated code from a simulink model (rapid simulation target) . Everything works fine so far, but i would like to access the "ssGetZcSignalName"-method which is defined in the simulink/include/simstruc.h folder. During compilation i receive an "undefined reference" error, because i don't know in which library the method is located.
At the moment i'm linking against the following libraries: m, mwsl_solver_rtw, mat, mx, ut and mwsl_fileio. I could find the method by searching every single file in the matlab bin folder, but that would be very tedious ;-). Can somebody tell me in which library this method is located?

回答(1 个)

Kaustubha Govind
Kaustubha Govind 2013-3-5
I see it defined in simulink/include/simulink.c, which is supposed to be included in all S-functions by virtue of the lines:
#ifdef MATLAB_MEX_FILE /* Is this file being compiled as a
MEX-file? */
#include "simulink.c" /* MEX-file interface mechanism */
#else
#include "cg_sfun.h" /* Code generation registration
function */
#endif
However, as you can see, it looks like maybe for the RSIM target, the S-function is probably not compiled into a MEX-file, so simulink.c is not included. Perhaps you need to contact MathWorks Tech Support to find out if you should be able to use ssGetZcSignalName in the RSIM target or not?

类别

Help CenterFile Exchange 中查找有关 General Applications 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by