set_paramでブロック変数の変更ができない

set_paramでブロック変数の変更をしようとするとエラーが出てしまいます。
例えばConstantブロックのValueを変えようとすると以下のエラーがでます。
「パラメーター 'Value' に対する Constant block 'Constant' 内の設定が無効です」
解決策をご教示頂けないでしょうか。
宜しくお願い致します。

 Respuesta aceptada

Toshinobu Shintai
Toshinobu Shintai el 14 de Jun. de 2023

1 voto

例えば、以下のように記述していませんでしょうか。
set_param('Constant', 'Value', 2)
渡せる値は数値ではなく、文字列です。例えばブロックに2を入れたい場合は、
set_param('Constant', 'Value', '2')
と記述します。

1 comentario

基喜
基喜 el 14 de Jun. de 2023
ご回答有難う御座います。
無事解決致しました。

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre ループと条件付きステートメント en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 14 de Jun. de 2023

Comentada:

el 14 de Jun. de 2023

Community Treasure Hunt

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

Start Hunting!