Documentation Center

  • Trial Software
  • Product Updates

Create an Empty Model

To create an empty model:

  1. Open the Library Browser, by typing simulink at the MATLAB® command line.

  2. In the Library Browser, select File > New > Model or click the New model button ( ).

The Simulink® software creates an empty model in memory and displays the empty model in a Simulink Editor window.

Create a Model Template

When you create a model, Simulink uses defaults for many configuration parameters. For example, by default new models have a white canvas, the ode45 solver, and a visible toolbar. If these or other defaults do not meet your needs, use the Simulink model construction functions listed in Modeling Basics to write a function that creates a model with the defaults that you prefer. For example, the following function creates a model that has a green canvas and uses the ode3 solver:

function new_model(modelname) 
% NEW_MODEL Create a new, empty Simulink model
%    NEW_MODEL('MODELNAME') creates a new model with
%    the name 'MODELNAME'. Without the 'MODELNAME'
%    argument, the new model is named 'my_untitled'.

if nargin == 0 
     modelname = 'my_untitled';
end 

% create and open the model
open_system(new_system(modelname));

% set default screen color
set_param(modelname, 'ScreenColor', 'green');

% set default solver
set_param(modelname, 'Solver', 'ode3');

% save the model
save_system(modelname);
Was this topic helpful?