Simulink.RunTimeBlock

Allow Level-2 MATLAB S-function
and other MATLAB programs
to get information about block while simulation is running

Description

This class allows a Level-2 MATLAB® S-function
or other MATLAB program
to obtain information about a block. Simulink® software creates
an instance of this class or a derived class for each block in a model. Simulink software
passes the object to the callback methods of Level-2 MATLAB S-functions when it updates
or simulates a model, allowing the callback methods to get block-related
information from and provide such information to Simulink software.
See Write Level-2 MATLAB S-Functions in Writing S-Functions
for more information. You can also use instances of this class in MATLAB programs to obtain information
about blocks during a simulation. See Access Block Data During Simulation for more information.

NoteSimulink.RunTimeBlock objects do not support MATLAB sparse
matrices. For example, the following line of code attempts to assign
a sparse identity matrix to the run-time object's output port data.
This line of code in a Level-2 MATLAB S-function
produces an error:

See Also

Derivatives

Purpose

Syntax

Description

See Also

DialogPrm

Purpose

Get an S-function's dialog parameters.

Syntax

param = DialogPrm(pIdx);

Arguments

pIdx

Integer value specifying the index of the parameter to be returned.

Description

Get the specified dialog parameter. In the case of the S-function,
each DialogPrm corresponds to one of the elements
in the comma-separated list of parameters in the S-function
parameters dialog field.

See Also

FixedPointNumericType

Purpose

Syntax

Arguments

dtID

Integer value specifying the ID of a fixed-point data type.

Description

Returns an object of embedded.Numeric class
that contains the attributes of the specified fixed-point data type.

Noteembedded.Numeric is also the class of the numerictype objects
created by Fixed-Point Designer™ software. For information on the
properties defined by embedded.Numeric class, see numerictype Object Properties.

InputPort

Purpose

Get an input port of a block.

Syntax

port = InputPort(pIdx);

Arguments

pIdx

Integer value specifying the index of an input port.

Description

Get the input port specified by pIdx, where pIdx is
the index number of the input port. For example,

port = rto.InputPort(1)

returns the first input port of the block represented by the
run-time object rto.