ADD_BLOCK 関数でモデルにブロッ​クを追加できないのは​なぜですか?

10 views (last 30 days)
MathWorks Support Team
MathWorks Support Team on 16 Feb 2012
myModel.mdl というモデルにブロックを追加したいのですが、以下のコマンドを実行するとエラーとなる場合があります。
open myModel.mdl
add_block('simulink/Sources/In1','myModel/myin1')
??? There is no block named 'simulink/Sources/In1'

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 16 Feb 2012
Simulink ライブラリや、登録されたライブラリをロードする必要があります。このためには LOAD_SYSTEM 関数を使用します。
load_system('simulink')
open myModel.mdl
add_block('simulink/Sources/In1','myModel/myin1')

More Answers (0)

Categories

Find more on プログラムによるモデル編集 in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!