What is a differece between a constant and Paremeter in Model simulation ?
조회 수: 12 (최근 30일)
이전 댓글 표시
what is the differene between constants and parameters in stateflow ?
Why are these two different objects used , when one can serve the purpose ?
are there any specific use ? like when to use parameter and when to use constant ?
댓글 수: 0
채택된 답변
Kaustubha Govind
2013년 3월 4일
Do you mean that a Parameter can serve as a Constant? I think a Constant is still needed because it's value doesn't change during simulation and can be inlined into the C code generated for the Stateflow chart, without needing to read it from the workspace (like you might need to do for a Parameter, especially in case of a tunable parameter which can change during simulation). So if you are using a constant value which doesn't change, it is might be more optimal to declare it as a constant.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Manual Performance Optimization에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!