Main Content

IC

Set initial value of signal

  • IC block

Libraries:
Simulink / Signal Attributes

Description

The IC block sets the initial condition of the signal at its input port, for example, the value of the signal at the simulation start time (tstart). To do so, the block outputs the specified initial condition when you start the simulation, regardless of the actual value of the input signal. Thereafter, the block outputs the actual value of the input signal.

The IC block is useful for providing an initial guess for the algebraic state variables in a loop. For more information, see Algebraic Loop Concepts.

Behavior for Nonzero Sample Time Offset

If an IC block has a nonzero sample time offset (toffset), the IC block outputs its initial value at time t,

t = n * tperiod + toffset

where n is the smallest integer such that t ≥ tstart.

That is, the IC block outputs its initial value the first-time blocks with sample time [tperiod, toffset] execute, which can be after tstart.

Examples

Ports

Input

expand all

Input signal, specified as a scalar, vector, matrix, or N-D array. The block sets the initial condition of this signal to the Initial value you specify.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | Boolean | fixed point | enumerated | bus

Output

expand all

Output signal provided as the Initial value you specify, followed by the actual values of the input signal. See Behavior for Nonzero Sample Time Offset for more information.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | Boolean | fixed point | enumerated | bus

Parameters

expand all

Specify the initial value of the input signal as a finite, real-valued scalar, vector, matrix, or N-D array. The value must be a scalar, or have the same dimensions as the input signal.

Programmatic Use

Block Parameter: Value
Type: character vector
Values: scalar | vector | matrix | N-D array
Default: '1'

Specify the time interval between samples. To inherit the sample time, set this parameter to -1. For more information, see Specify Sample Time.

Dependencies

This parameter is visible only if you set it to a value other than -1. To learn more, see Blocks for Which Sample Time Is Not Recommended.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

Parameter: SampleTime
Values: "-1" (default) | scalar or vector in quotes

Block Characteristics

Data Types

Boolean | bus | double | enumerated | fixed point | integer | single

Direct Feedthrough

yes

Multidimensional Signals

yes

Variable-Size Signals

no

Zero-Crossing Detection

no

Extended Capabilities

Fixed-Point Conversion
Design and simulate fixed-point systems using Fixed-Point Designer™.

Version History

Introduced before R2006a

expand all