S-function does not exist error in Simulink MATLAB
51 ビュー (過去 30 日間)
古いコメントを表示
I am trying to run a model in SImulink Matlab that uses both Matlab based S-function block (a .mexw32 file) and a C code based S-function block (a .c file). When I run the model, I get the error below:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1258650/image.png)
I don't know why it keeps saying "It does not exist". The file is there, and it does exist. Someone should please help me out here. See the files in one folder below:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1258655/image.png)
I also downloaded and installed MATLAB support for MinGW-w64 C/C++ Compiler to compile the C code so that it can be called from MATLAB using MEX. I'm still getting the same error despite doing this. I don't know what else to do.
0 件のコメント
回答 (1 件)
Aditya Jha
2023 年 1 月 17 日
Hi!
Simulink needs the s-function to be compiled into a mexw64.Please find the below MATLAB answers post with similar query: https://www.mathworks.com/matlabcentral/answers/735042-s-function-does-not-exist-but-is-clearly-in-the-matlab-path
参考
カテゴリ
Help Center および File Exchange で MATLAB Compiler についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!