How to set 1D Table characteristics from script

9 ビュー (過去 30 日間)
Lila Lotus
Lila Lotus 2020 年 9 月 10 日
回答済み: stozaki 2020 年 9 月 10 日
Dear all,
is it possible to set parameters of simulink 1D Block (Lookup table) from matlab script (i.e. using set_param).
I need to configure 1D lookup table
i.e. Number of Dimentions=1
TableData=[ 0, 0, 80, 150, 270, 520, 820, 1180, 1450, 1650, 1650,1650]
Breakpoints1=[ 0, 100, 200, 300, 400, 600, 800, 1000, 1200, 1400, 1500,2000]
Can somebody provide an example please.

採用された回答

stozaki
stozaki 2020 年 9 月 10 日
Hello Lila,
If the block path (character) or block handle (numerical value) of the target 1D LookupTable block is "blkName" , it will be as follows.
set_param(blkName,'Table','[ 0, 0, 80, 150, 270, 520, 820, 1180, 1450, 1650, 1650,1650]');
set_param(blkName,'BreakpointsForDimension1','[ 0, 100, 200, 300, 400, 600, 800, 1000, 1200, 1400, 1500,2000]');
Regards,
stozaki

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by