Creating simulink block and hidding the code

3 次查看(过去 30 天)
Hello,
I would like to know how to create a Simulink block where the code or how I did it is not open, that is hidden. It's like having a block where you can't see under the mask, the unlock option was not available.
Imagine I want to have to make a library for commercial use. The blocks in my library contain algorithms that are not public, how is this done?
I have looked for it and I have not found any information.

回答(3 个)

Paulo Silva
Paulo Silva 2011-6-10

Arnaud Miege
Arnaud Miege 2011-6-10
Have a look at the question that Paulo suggested. For what you want to do, I suspect an S-function is the best option. You'll need Real-Time Workshop (now called Simulink Coder) to generate the binary that you can share/sell to a third-party.The end-user needs to run on the same O/S as the one where the binary was generated.
HTH,
Arnaud

MarkB
MarkB 2011-6-13
The S-function approach is probably the right way to go. If you plan on distributing it, you would need to provide a ".mex" file for every architecture that you plan to support (e.g. ".mexw32", ".mexw64", etc.)
In addition to this, you might be able to support code-generation as well by providing ".o" or ".lib" files for most of the source and only using TLC to generate function calls that will use those ".o"/".lib" files.

类别

Help CenterFile Exchange 中查找有关 Simulink Coder 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by