Compile and Debug Mex files with Visual Studio 2010

2 ビュー (過去 30 日間)
Mathew
Mathew 2012 年 4 月 24 日
コメント済み: Robert Jack 2023 年 7 月 28 日
Hello,
I'd like to use Visual Studio to compile and debug simulink s-function mex files using the Visual Studio 2010 IDE. So far I have managed to compile mexw32 files using this guide.
However, I can't figure out how to "load" the output file into the s-function simulink block. It seems that this block only accepts source code files. I'd like to use the mex file compiled with Visual Studio instead.
Any thoughts?
I'm running Matlab 7.12 (2011a) on windows XP x86 Service Pack 3.
Mathew

採用された回答

Kaustubha Govind
Kaustubha Govind 2012 年 4 月 24 日
The S-function block does actually accept only MEX-file names. For example, if you have a file called mytest.mexw32, enter "mytest" (without the quotes) as the S-function name. However, note that S-functions are one kind of MEX-function. Not all MEX-files are S-functions. See What Is an S-Function?

その他の回答 (2 件)

Mathew
Mathew 2012 年 4 月 25 日
Thank you! I'd add also that I had to navigate to the correct mex file path in the Matlab Environment.

Mike Woodward
Mike Woodward 2012 年 6 月 28 日
編集済み: Walter Roberson 2012 年 6 月 28 日
Hi,
The content on this web page should help solve your problem: http://www.mathworks.com/programs/simulink-visual-studio/simulink-and-visual-studio.html
Mike
  1 件のコメント
Robert Jack
Robert Jack 2023 年 7 月 28 日
Page no longer exists

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMATLAB Compiler についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by