new_system
Create Simulink model or library in memory
Syntax
Description
creates
a model named h
= new_systemuntitled
(and then untitled1
, untitled2
,
and so on) based on your default model template and returns the new
model’s numeric handle. Select your default model template
on the Simulink® start page or by using the Simulink.defaultModelTemplate
function.
The new_system
function does not open the
new model. This function creates the model in memory. To save the
model, use save_system
, or open the model with open_system
and
then save it using the Simulink Editor.
creates
a model based on your default model template and gives the new model
the specified name. This function returns the new model’s numeric
handle. Select your default model template on the Simulink start
page or by using the h
= new_system(name
)Simulink.defaultModelTemplate
function.
To avoid shadowing, if name
is empty, the new_system
function checks loaded models and files on the path and creates a model with the
next available name untitled
, untitled1
,
untitled2
, and so on.
The new_system
function does not open the
new model. This function creates the model in memory. To save the
model, use save_system
, or open the model with open_system
and
then save it using the Simulink Editor.
creates
the model or returns an error if another model, MATLAB® file,
or variable with the same name is on the MATLAB path or in the
workspace. It uses any of the input arguments in the previous syntaxes.h
= new_system(___,'ErrorIfShadowed')
creates an empty model based on the Simulink default model and returns the new model’s numeric handle. The
Simulink default model is also known as the root block diagram and has the
numeric handle h
= new_system(name
,'Model')0
. If name
is empty, the
function creates a model or library named untitled
,
untitled1
, untitled2
, and so
on.
The new_system
function does not open the new model. This
function creates the model in memory. To save the model, use
save_system
, or open the model with
open_system
and then save it using the Simulink Editor.
creates an empty subsystem file that has the specified name. h
= new_system(name
,'Subsystem')
creates
an empty library that has the specified name and returns a numeric
handle. h
= new_system(name
,'Library')
returns
an error if another model, MATLAB file, or variable with the
same name is on the MATLAB path or in the workspace. This syntax
uses any of the input arguments in the previous syntaxes.h
= new_system(___,'ErrorIfShadowed')
Examples
Input Arguments
Version History
Introduced before R2006a