Block parameter and values in simulink

2 ビュー (過去 30 日間)
Ajay krishna Vasanthakumar
Ajay krishna Vasanthakumar 2020 年 6 月 20 日
Hello everyone,
is it possible to get the block parameters and value using simulink api?
for example:
i want the parameter pair values of all the tabs here.
Thanks

採用された回答

Paul
Paul 2020 年 6 月 20 日
編集済み: Paul 2020 年 6 月 20 日
get_param(gcb,'DialogParameters')
That function returns a struct with all of the dialog parameters for the current block. Or replace gcb with the name of whatever block you care about. The fields of that struct define the parameters of the block that you can interrogate. For a Gain block:
>> d=get_param(gcb,'DialogParameters')
d =
struct with fields:
Gain: [1×1 struct]
Multiplication: [1×1 struct]
ParamMin: [1×1 struct]
ParamMax: [1×1 struct]
ParamDataTypeStr: [1×1 struct]
OutMin: [1×1 struct]
OutMax: [1×1 struct]
OutDataTypeStr: [1×1 struct]
LockScale: [1×1 struct]
RndMeth: [1×1 struct]
SaturateOnIntegerOverflow: [1×1 struct]
SampleTime: [1×1 struct]
>> get_param(gcb,'OutMax')
ans =
'[]'
  1 件のコメント
Ajay krishna Vasanthakumar
Ajay krishna Vasanthakumar 2020 年 6 月 21 日
Thanks paul :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by