Initial output value of Outport in top level subsystem of a model.
조회 수: 3 (최근 30일)
이전 댓글 표시
Consider an unconditional top level subsystem of a model. 'Initial output' field of Outports in top level is disabled in block parameter dialog. Does this field affect the code generation. If yes how it will affect?
I am using matlab r2007a with embedded coder. I have seen if Initial output has some value and even if it is disabled, associated signal in generated code is initialized with that value in mdl_initialize function.
댓글 수: 0
답변 (1개)
Desiree
2011년 9월 8일
There is an optimization option which you can check to remove the zero initialization of root level I/O ports: "Remove root level I/O zero initialization". See the doc here. Be aware that this only counts for initial values of zeros or when the option is disabled.
댓글 수: 2
Desiree
2011년 9월 8일
This does sound like a bug. There shouldn't be an initialization when the option is disabled. I wasn't able to reproduce this in newer versions though. Please try with a newer version than R2007a to see if the issue persists.
참고 항목
카테고리
Help Center 및 File Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!