Creating a Simulink model using command Lines

1 回表示 (過去 30 日間)
Ibrahim Ben Mrad
Ibrahim Ben Mrad 2022 年 4 月 10 日
コメント済み: Ibrahim Ben Mrad 2022 年 4 月 11 日
Hello!
I'm trying to create a Simulink model using command Lines. My task is to implement a resistor in series with a capacitor (files attached).
i have a problem to set a Value for the capacitor as well as for the resistor even though i wrote:
set_param(Bauteilname, 'position', [x1, y1, x1+40, y1+40], 'Capacitance', '5e-6') and
set_param(Bauteilname1, 'position', [x1, y1, x1+40, y1+40], 'Resistance','5')
the error says:
______________________________________________________________________________
"Error using verbinde1 (line 8)
Capacitor block (mask) does not have a parameter named 'Capacitance'"
______________________________________________________________________________
How can i fix this, so the Values are set?
thx very much

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2022 年 4 月 11 日
The property name for Capacitance is 'c'
set(gcbh,'c','1e-5')
  1 件のコメント
Ibrahim Ben Mrad
Ibrahim Ben Mrad 2022 年 4 月 11 日
it worked!
thx very much

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by