フィルターのクリア

Is there a way to pass the name of an input signal to a matlab function block in simulink?

1 回表示 (過去 30 日間)
Tom
Tom 2022 年 8 月 8 日
回答済み: Fangjun Jiang 2022 年 8 月 9 日
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

回答 (1 件)

Fangjun Jiang
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;

カテゴリ

Help Center および File ExchangeSources についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by