There is no limit on what C-functions you can use in your C-MEX S-functions, as long as the code is ANSI-C compatible. You just need to figure out the right build rules that you need (ie. header files, libraries, etc.), and supply them appropriately at the time of compiling the MEX-file. So essentially, you need to figure out how you would write standalone C-code for your application and compile it into a binary outside of MATLAB - if you are able to do so, you just need to write an S-function wrapper for that code. In fact you can even use the Legacy Code Tool to automatically generate an S-function for you, once you have your C code.
S-Function & Hardware Interface
3 次查看(过去 30 天)
显示 更早的评论
Hi everyone! I want to communicate with a RS-232 Port and a USB Port by a s-function way. I want to know how the S-function communicate with the operating system and where can I find the supported c function list in s-function.
0 个评论
回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!