Simulink function block output not resolving to signal

조회 수: 7 (최근 30일)
Haroon Zafar
Haroon Zafar 2023년 6월 7일
답변: Haroon Zafar 2023년 6월 8일
I am trying to generate a signal driving a current source using a function block in Simulink. But I am getting errors about the output ”Iharm”. The function works fine in Matlab workspace but not working in simulink environment.
Error:
Output 'Iharm' has variable size but the upper bound is not specified; explicit upper bound must be provided.
Or “Iharm” can not resolve to signal object.
I have tried specifying the bounds using assert and coder.varsize, but still error is there. Also specifying “Data must resolve to signal object” in Model workspace does not seem to work.
Simulink model is attached if anyone can help me to resolve this issue.

채택된 답변

Haroon Zafar
Haroon Zafar 2023년 6월 8일
Issue is resolved now...
Go to Model Explorer... Select the function block and corresponding function output.
Change the Type from "Inherit: Same as Simulink" to Double or any other data type.
Corrected model is attached.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Signal Generation에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by