setupImpl
Class:matlab.System
InitializeSystem object
Syntax
setupImpl(obj)
setupImpl(obj,input1,input2,...)
Description
setupImpl(
implements one-time tasks.obj
)
setupImpl(
sets up a System object™ using one or more of theobj
,input1,input2,...
)stepImpl
input specifications.
Run-Time Details
setupImpl
is called via thesetup
method. Users never call thesetup
method directly. But,setup
is called the first time a System object is run and after a System object has been released. For details, seeDetailed Call Sequence
Method Authoring Tips
If your System object does not require any setup tasks, you can omit this method from your class definition file.
Use
setupImpl
to set private properties so they do not need to be calculated each timestepImpl
method is called.To acquire resources for a System object, you must use
setupImpl
instead of a constructor.You must set
Access = protected
for this method.Do not use
setupImpl
to initialize or reset states. For states, use theresetImpl
method.If the System object will be used in the Simulink®MATLAB System(Simulink)block, you cannot modify any tunable properties in the
setupImpl
methodDo not use the
setupImpl
method to set up input values.Do not include validation in
setupImpl
. To validate properties or inputs use thevalidatePropertiesImpl
,validateInputsImpl
, or找
methods.