Products & Services Industries Academia Support User Community Company

Learn more about Simulink   

open_system - Open Simulink system window or block dialog box

Syntax

open_system('sys')
open_system('blk')
open_system('blk', 'force')
open_system('blk', 'parameter')
open_system('blk', 'mask')
open_system('blk', 'OpenFcn')
open_system('sys', 'destsys', 'replace')
open_system('sys', 'destsys', reuse')

Description

open_system('sys') opens the specified system or subsystem window, where 'sys' is the name of a model on the MATLAB path, the fully qualified pathname of a model, or the relative pathname of a subsystem of an already opened system (for example, engine/Combustion). On UNIX systems, the fully qualified pathname of a model can start with a tilde (~), signifying your home directory.

open_system('blk'), where 'blk' is a full block pathname, opens the dialog box associated with the specified block. If the block's OpenFcn callback parameter is defined, the routine is evaluated.

open_system('blk', 'force'), where 'blk' is a full pathname or a masked system, looks under the mask of the specified system. This command is equivalent to using the Look Under Mask menu item.

open_system('blk', 'parameter') opens this block's parameter dialog box.

open_system('sys', 'mask') opens this block's mask.

open_system('blk', 'OpenFcn') runs this block's open function.

open_system('sys', 'destsys', 'replace') replaces the window of the previously opened system destsys with the window of the subsystem sys opened by this command. The location of the new window is determined by the location of the destination system destsys while the size of the window will match that used by sys.

open_system('sys', 'destsys', 'reuse') reuses the window of the previously opened system destsys to display the contents of the subsystem sys opened by this command. In this case, sys will be scaled to fit within the window size determined by the destination system destsys.

Examples

This command opens the controller system in its default screen location.

open_system('controller');

This command opens the block dialog box for the Gain block in the controller system.

open_system('controller/Gain');

This command opens f14 into the f14/Controller window using reuse mode.

open_system('f14','f14/Controller','reuse');

Suppose that mymodel contains a masked subsystem, A, and a block, B, whose OpenFcn contains the following lines:

open_system('mymodel/B', 'parameter');
open_system('mymodel/A', 'mask');

Then opening block B causes both the parameter dialog box for B and the mask dialog box for A to appear.

This command opens f14 and vdp with a vectorized operation.

open_system( {'f14','vdp'} );

Open a subsystem after loading a model.

load_system('f14');
open_system('f14/Controller');

See Also

close_system, load_system, new_system, save_system

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS