How to do a system call from simulink?
3 ビュー (過去 30 日間)
古いコメントを表示
I would like to embed a C executable in a Matlab Simulink block. The example C files are attached. This has a simple function that calculates sum of two numbers. Does the exe need special inputs/outputs to work with Simulink?, also how to use system call to execute the .exe file within simulink block.
1 件のコメント
Stefan Kerber
2023 年 11 月 16 日
Hello Gunasheela
It is not straight forward to do a system call from Simulink. However, since you have the C-code available I suggest to build a MEX Function from it. A starting point to learn how this works can be Create a Basic C MEX S-Function - MATLAB & Simulink (mathworks.com) or Build C MEX Function - MATLAB & Simulink (mathworks.com)
Good luck, best wishes
Stefan
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!