Is there a way to pass the name of an input signal to a matlab function block in simulink?
조회 수: 1 (최근 30일)
이전 댓글 표시
Dear community,
i have a question: Is there a way to pass the name of an input signal to a matlab function block in simulink? If so, how does it work?
Thanks for your help!
Tom
댓글 수: 0
답변 (1개)
Fangjun Jiang
2022년 8월 9일
Not through passing but you can get it through get_param(). Note that some functions are not supported for code generation.
function y = fcn(u,x)
coder.extrinsic('gcb');
coder.extrinsic('get_param');
in=get_param(gcb,'InputSignalNames');
disp(in);
y = u;
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Sources에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!