About embedded function inside simulink
조회 수: 5 (최근 30일)
이전 댓글 표시
I am stranger in simulink. Cp=5193 is just a number. 'Cp' is globally declared in Matlab embedded function.It is defined as signal in model explorer with datatype ->double, complexity-> real, dimension->2 In edit -> data port manager -> it is defined as parameter with size [1 1]
Error:
1.Expression 'Cp' for initial value of data 'Cp' (#61) must evaluate to a numeric or logical.
2.Error reported by S-function 'sf_sfun' in 'PBR_Temp_Xe/Embedded MATLAB Function/ SFunction ': Stateflow Suppress Error
댓글 수: 0
채택된 답변
Azzi Abdelmalek
2012년 7월 20일
편집: Azzi Abdelmalek
2012년 7월 20일
you can't déclare a global variable in embedded function . you have to pass it through inputs argument. for now a compiler don't allow globals variables
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!