Creating simulink block and hidding the code

조회 수: 2 (최근 30일)
Thiago Marinho
Thiago Marinho 2011년 6월 10일
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