Model Editing Fundamentals

Build block diagram models using blocks and signal lines

Learn the basics you need to build models and be productive in the Simulink® editing environment.

Build and Edit a Model in the Simulink Editor covers the complete modeling process, from starting the software to building the block diagram to simulating and viewing results. Master the tips, tricks, and shortcuts that speed up model building.

Parts of a Model introduces concepts and vocabulary that serve as a foundation for learning about and using Simulink beyond the basics.


simulinkOpen Simulink Start Page
start_simulinkStart Simulink without opening any windows
slLibraryBrowserOpen Simulink Library Browser
new_systemCreate Simulink model or library in memory
open_systemOpen Simulink model, library, subsystem, or block dialog box
load_systemInvisibly load Simulink model
deCreate model or project from template
Simulink.findTemplatesFind model or project templates with specified properties
Simulink.defaultModelTemplateSet or get default model template
add_blockAdd block to model
add_lineAdd line to Simulink model
replace_blockReplace blocks in Simulink model
delete_blockDelete blocks from Simulink system
delete_lineDelete line from Simulink model
bdrootReturn name of top-level Simulink system
find_systemFind systems, blocks, lines, ports, and annotations
gcsGet pathname of current system
getfullnameGet pathname of block or line
gcbGet path name of current block
gcbhGet handle of current block
getSimulinkBlockHandleGet block handle from block path
set_paramSet system and block parameter values
get_paramGet parameter names and values
add_paramAdd parameter to Simulink system
delete_paramDelete system parameter added via add_param command
Simulink.BlockDiagram.createSubsystemCreate subsystem containing specified set of blocks
Simulink.BlockDiagram.deleteContentsDelete contents of block diagram
Simulink.BlockDiagram.expandSubsystemExpand subsystem contents to containing model level
Simulink.SubSystem.copyContentsToBlockDiagramCopy contents of subsystem to empty block diagram
Simulink.SubSystem.deleteContentsDelete contents of subsystem
save_systemSave Simulink system
close_systemClose Simulink system window or block dialog box
Simulink.exportToTemplateCreate template from model or project
Simulink.exportToVersionExport model or library for use in previous version of Simulink
bdcloseClose any or all Simulink system windows unconditionally
bdIsLoadedWhether block diagram is in memory
bdIsLibraryWhether block diagram is a library
bdIsDirtyWhether block diagram has unsaved changes
slCharacterEncodingChange MATLAB character set encoding
slIsFileChangedOnDiskDetermine whether model has changed since it was loaded
printPrint figure or save to specific file format
orientPaper orientation for printing or saving
frameeditEdit print frames for Simulink and Stateflow block diagrams

Examples and How To

Build and Edit Models

Start the Simulink Software

To build Simulink models, use the Simulink start page, the Simulink Editor, and the Library Browser.

Create and Open Models

Use the Simulink Start Page to select a model template, open recent models, and find examples.

Model Editing Environment

Use the Simulink Editor and the Library Browser to create models and set model properties.

Parts of a Model

The basic parts of a model include blocks, signals, parameters, and properties.

Keyboard and Mouse Actions for Simulink Modeling

Interact with the Simulink Editor using keyboard commands and mouse actions.

Build and Edit a Model in the Simulink Editor

Assemble models using the Simulink Editor, and learn editing tips and tricks.

Adjust Visual Presentation to Improve Model Readability

Flip and rotate blocks, change fonts, use color, box and label areas, and hide and display block names.

Find Model Elements in Simulink Models

Use different approaches to locate model elements, based on model complexity and goals.

Update Diagram and Run Simulation

Updating the diagram provides the simulation with the results of the latest changes that you have made to a model.

Model Files

Save a Model

Save models, specify valid model names, file format, and character encoding. Export to different versions of Simulink.

Create a Template from a Model

Create a template to reuse customized settings in new models, including configuration settings, blocks, and visual presentation.

Manage Model Versions and Specify Model Properties

View and edit model version information, history, callback functions, and the model description.

Simulink API

Programmatic Modeling Basics

Create models, add and connect blocks in models, set parameters and properties, and perform other modeling basics programmatically.

Was this topic helpful?