Can't get Simulink model to recognize a Level-2 S-Function using c file
显示 更早的评论
Hi
I am using Matlab R2021a. I have a simple model in which I am using a Level-2 S-function and providing the name of a compiled C file. The C file name is phase_det.c and the name I put in the C file is #define S_FUNCTION_NAME phase_det
In the Simulink model (test.slx), I use a Level-2 S-Function I entered the name phase_det
This is similar to the Matlab example dsfunc.c. Which I have been successfully able to compile using mex dsfunc, then runnning okay.
Similarly, I was able to compile using mex phase_det.c.
When I run the Simulink model test.slx I get the error " Level-2 MATLAB S-function 'phase_det' does not exist"
I'v been working on this for hours and know it must be something really silly that I missed. Its almost like the phase_det.mexw64 file is not in my running directory, but it is.
I included the zipped files.
Thank-you very much for helping,
Brian
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!