Simulink constant parameter read inside Matlab Function block
이전 댓글 표시
Hi. I defined some Simulink parameters to the Model Workspace of a Simulink model. When used in a Constant block, the code compiles with no error. When used in a Matlab Function block, I get the 'undefined variable' error.
How can I use global parameters in the Matlab Function block, without having to add an input port for each parameter?
Thanks
댓글 수: 3
Azzi Abdelmalek
2012년 10월 12일
your version of Matlab?
Azzi Abdelmalek
2012년 10월 12일
how many parameters do you have? their size?
River Rock
2012년 10월 12일
편집: River Rock
2012년 10월 12일
채택된 답변
추가 답변 (1개)
Azzi Abdelmalek
2012년 10월 12일
편집: Azzi Abdelmalek
2012년 10월 12일
If you have sevral parameters with the same size , you can use one constant block with value
[param1 param2 ... paramn]
카테고리
도움말 센터 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!