Simulinkモデ​ルの画面に合わせた表​示について

Simulinkモデルをウィンドウサイズに合わせて表示する方法に、スペースキーを押す(或いは、表示メニュー→ビューに合わせる)
がありますが、これらを、モデルすべてのサブシステム階層に適用するスクリプトを記述するにはどのようにすればよいでしょうか。

 Accepted Answer

Naoya
Naoya on 1 Apr 2019

0 votes

コマンドラインレベルでSimulinkモデルをウィンドウサイズに合わせる方法としては、次のコマンドで可能です。
>> set_param(gcs, 'ZoomFactor', 'FitSystem')
モデルすべてに対して適用する場合は、以下手順で実現できると思います。
% サンプルモデルの起動
>> f14
% root階層に対してズームフィットさせる
set_param(bdroot,'ZoomFactor','FitSystem');
% モデルの各サブシステムに対してズームフィットさせる
syss = find_system(bdroot,'BlockType','SubSystem');
for n = 1:length(syss)
set_param(syss{n},'ZoomFactor','FitSystem');
end

More Answers (1)

motohiro sugimoto
motohiro sugimoto on 4 Apr 2019

0 votes

回答ありがとうございました

Categories

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

Products

Community Treasure Hunt

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

Start Hunting!