フィルターのクリア

how do i run c code which created by simulink coder

3 ビュー (過去 30 日間)
Eric Hu
Eric Hu 2018 年 1 月 23 日
回答済み: Mark Schwab 2018 年 1 月 26 日
I am trying to run a C code in Matlab. The C code is from simulink and it is been compiled by simulink coder. I got a folder of code and I was trying to use mex function to convert C code into mex file and run. but there is the error. I searched online about converting C in matlab and it seems mex is the correct way. is there anyone can help me out?
thank you in advance.

回答 (1 件)

Mark Schwab
Mark Schwab 2018 年 1 月 26 日
After you run the mex command on your c file, an executable file (.exe extenstion) should appear in your directory. To run this executable, you use the bang operator, or the exclamation mark. For example, if I ran the mex function on a file helloworld.c, a file helloworld.exe would show up in my directory. Then I would execute the following command:
>> !helloworld
Hello World!
The following documentation may be useful: https://www.mathworks.com/help/dsp/ug/generate-c-code-from-simulink-model.html Please note that this documentation is for the DSP system toolbox, so you may not be able to open the example models, but the information is still relevant to your workflow.

カテゴリ

Help Center および File ExchangeSimulink Coder についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by