Repeating Sequence Stair
Output and repeat discrete time sequence
Libraries:
Simulink /
Sources
Description
The Repeating Sequence Stair block outputs and repeats a stair sequence that
you specify with the Vector of output values parameter. For
example, you can specify the vector as [3 1 2 4 1]'
. A value in
Vector of output values is output at each time interval, and
then the sequence repeats.
Examples
Fixed-Point S-Functions: Product and Sum
How to exercise a custom C language S-function written to compute a fixed-point "product and sum" operation. To see the source code for the S-function, use the right-click context menu to select "Block Parameters". When the dialog box appears, press the Edit button.
(Fixed-Point Designer)
Fixed-Point Prelookup and Interpolation
Demonstrates some of the features of Prelookup and Interpolation Using Prelookup blocks.
(Fixed-Point Designer)
Ports
Output
Port_1 — Repeating discrete output signal
scalar
Output signal generated based on the values in the Vector of time values and Sample time parameters.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| Boolean
| fixed point
| enumerated
Parameters
Main
Vector of output values — Vector of output values
[3 1 4 2 1].'
(default) | vector
Specify the vector containing values of the repeating stair sequence.
Programmatic Use
Block Parameter:
OutValues |
Type: character vector |
Values: vector |
Default: '[3 1 4 2
1].'' |
Sample time — Time interval between samples
-1
(default) | scalar
Specify the time interval between samples. To inherit the sample time,
set this parameter to -1
. See Specify Sample Time
for more information.
Programmatic Use
Block Parameter:
tsamp |
Type: character vector |
Values: scalar |
Default: '-1' |
Signal Attributes
Output minimum — Minimum output value for range checking
[]
(default) | scalar
Lower value of the output range that the software checks.
The software uses the minimum to perform:
Parameter range checking (see Specify Minimum and Maximum Values for Block Parameters) for some blocks.
Simulation range checking (see Specify Signal Ranges and Enable Simulation Range Checking).
Automatic scaling of fixed-point data types.
Optimization of the code that you generate from the model. This optimization can remove algorithmic code and affect the results of some simulation modes such as SIL or external mode. For more information, see Optimize using the specified minimum and maximum values (Embedded Coder).
Tips
Output minimum does not saturate or clip the actual output signal. Use the Saturation block instead.
Programmatic Use
To set the block parameter value programmatically, use
the set_param
function.
Parameter: | OutMin |
Values: | '[]' (default) | scalar in quotes |
Output maximum — Maximum output value for range checking
[]
(default) | scalar
Upper value of the output range that the software checks.
The software uses the maximum value to perform:
Parameter range checking (see Specify Minimum and Maximum Values for Block Parameters) for some blocks.
Simulation range checking (see Specify Signal Ranges and Enable Simulation Range Checking).
Automatic scaling of fixed-point data types.
Optimization of the code that you generate from the model. This optimization can remove algorithmic code and affect the results of some simulation modes such as SIL or external mode. For more information, see Optimize using the specified minimum and maximum values (Embedded Coder).
Tips
Output maximum does not saturate or clip the actual output signal. Use the Saturation block instead.
Programmatic Use
To set the block parameter value programmatically, use
the set_param
function.
Parameter: | OutMax |
Values: | '[]' (default) | scalar in quotes |
Output data type — Specify the output data type
double
(default) | Inherit: Inherit via back propagation
| single
| int8
| int32
| uint32
| int64
| uint64
| fixdt(1,16,2^0,0)
| <data type expression>
| ...
Choose the data type for the output. The type can be inherited,
specified directly, or expressed as a data type object such as
Simulink.NumericType
.
The Data Type Assistant helps you set data attributes. To use the Data Type Assistant, click . For more information, see Specify Data Types Using Data Type Assistant.
Programmatic Use
Block Parameter:
OutDataTypeStr |
Type: character vector |
Values: 'Inherit:
Inherit via back propagation' |
'double' | 'single' |
'int8' | 'uint8' |
int16 | 'uint16' |
'int32' | 'uint32' |
'int64' | 'uint64' |
fixdt(1,16,0) |
fixdt(1,16,2^0,0) |
fixdt(1,16,2^0,0) | '<data
type expression>' |
Default:
'double' |
Lock output data type setting against changes by the fixed-point tools — Prevent fixed-point tools from overriding data types
off
(default) | on
Select to lock the output data type setting of this block against changes by the Fixed-Point Tool and the Fixed-Point Advisor. For more information, see Use Lock Output Data Type Setting (Fixed-Point Designer).
Programmatic Use
Block Parameter:
LockScale |
Type: character vector |
Values:
'off' |
'on' |
Default:
'off' |
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
HDL Code Generation
Generate VHDL, Verilog and SystemVerilog code for FPGA and ASIC designs using HDL Coder™.
HDL Coder™ provides additional configuration options that affect HDL implementation and synthesized logic.
This block has one default HDL architecture.
General | |
---|---|
ConstrainedOutputPipeline | Number of registers to place at
the outputs by moving existing delays within your design. Distributed
pipelining does not redistribute these registers. The default is
|
InputPipeline | Number of input pipeline stages
to insert in the generated code. Distributed pipelining and constrained
output pipelining can move these registers. The default is
|
OutputPipeline | Number of output pipeline stages
to insert in the generated code. Distributed pipelining and constrained
output pipelining can move these registers. The default is
|
PLC Code Generation
Generate Structured Text code using Simulink® PLC Coder™.
Fixed-Point Conversion
Design and simulate fixed-point systems using Fixed-Point Designer™.
Version History
Introduced before R2006a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)