outputs
Define component outputs, that is, physical signal output ports of block
Parent Section: component
Syntax
outputs out1 = { value , 'unit' }; end
Description
outputs
begins a component outputs declaration section, which is
terminated by an end
keyword. This section contains declarations for
component outputs, which correspond to the physical signal output ports of a Simscape™ block generated from the component file.
Each output can be defined as:
A value with unit, where
value
can be a scalar, vector, or matrix. For a vector or a matrix, all signals have the same unit.An untyped identifier, to facilitate unit propagation.
The following syntax defines a component output, out1
, as a value
with unit. value
is the initial value. unit
is a
valid unit string, defined in the unit registry.
outputs out1 = { value , 'unit' }; end
If you declare an output without a value and unit, as an untyped identifier, then the
output signal type (size and unit) is based on the input signal type and unit
propagation rules. Use the following syntax to declare a component output,
out1
, as an untyped identifier.
outputs out1; end
You can specify the output port label, the way you want it to appear in the block diagram, as a comment:
outputs out1 = { value , 'unit' }; % label:location end
where label
is a string corresponding to the output port name in
the block diagram. You can use the Side
annotation to specify the
port location on the block icon. For more information, see Customize the Names and Locations of the Block Ports.
Examples
Version History
Introduced in R2008b