| Contents | Index |
Math Operations
The Find block locates all nonzero elements of the input signal and returns the linear indices of those elements. If the input is a multidimensional signal, the Find block can also return the subscripts of the nonzero input elements. In both cases, you can show an output port with the nonzero input values.
The Find block accepts and outputs real values of any numeric data type that Simulink supports.
For more information, see Data Types Supported by Simulink in the Simulink documentation.
The Main pane of the Find block dialog box appears as follows:

The Signal Attributes pane of the Find block dialog appears as follows:

Select the output format for the indices of the nonzero input values.
Default: Linear indices
Provides the element indices of any dimension signal in a vector form. For one dimension (vector) signals, indices correspond to the position of nonzero values within the vector. For signals with more than one dimension, the conversion of subscripts to indices is along the first dimension. You do not need to know the signal dimension of the input signal.
Provides the element indices of a two-dimension or larger signal in a subscript form. Because the block shows an output port for each dimension, this option requires you to know the number of dimensions for the input signal.
Selecting Subscripts from the Index output format list enables the Number of input dimensions parameter.
| Parameter: IndexOutputFormat |
| Type: string |
| Value: Linear indices | Subscripts |
| Default: Linear indices |
Specify the number of dimensions for the input signal.
Default: 1
Minimum: 1
Maximum: 32
Selecting Subscripts from the Index output format list enables this parameter.
| Parameter: NumberOfInputDimensions |
| Type: int |
| Value: positive integer value |
| Default: 1 |
Specify the indexing mode.
Default: Zero-based
An index of 0 specifies the first element of the input vector. An index of 1 specifies the second element, and so on.
An index of 1specifies the first element of the input vector. An index of 2, specifies the second element , and so on.
| Parameter: IndexMode |
| Type: string |
| Value: Zero-based | One-based |
| Default: Zero-based |
Show or hide the output port for nonzero input values.
Default: Off
Display the output port for nonzero input values. The additional output port provides the values of the nonzero input elements.
Hide the output port for nonzero input values.
| Parameter: ShowOutputPortForNonzeroInputValues |
| Type: string |
| Value: 'on' | 'off' |
| Default: 'off' |
Specify the time interval between samples. To inherit the sample time, set this parameter to -1. See How to Specify the Sample Time.
| Parameter: SampleTime |
| Type: string |
| Value: -1 (for inherited)| positive number |
| Default: -1 |
Specify the output data type.
Default: Inherit: Inherit via internal rule
Output data type is defined by the target.
Output data type is int8.
Output data type is uint8.
Output data type is int16.
Output data type is uint16.
Output data type is int32.
Output data type is unt32.
Output data type is fixed point, fixdt(1,16).
Use a data type object, for example, Simulink.NumericType.
Click the Show data type assistant button
to display additional
parameters for the Output data type parameter.
| Parameter: OutDataTypeStr |
| Type: string |
| Value: 'Inherit: Inherit via internal rule' | 'int8' | 'uint8' | 'int16' | 'uint16' | 'int32' | 'uint32'| 'fixdt(1,16)'| '<data type expression>' |
| Default: 'Inherit: Inherit via internal rule' |
Specifying Block Output Data Types, Using the Data Type Assistant
Select the category of data to specify.
Default: Inherit
Inheritance rules for data types. Selecting Inherit enables a second list of the possible values:
Inherit via internal rule (Discrete-Time Integrator, Gain, Product, Sum, Switch block default)
Built-in data types. Selecting Built in enables a second list of the possible values:
int8
uint8
int16
uint16
int32
uint32
Fixed-point data types.
Expressions that evaluate to data types. Selecting Expression enables a second text box, where you can enter the expression.
Clicking the Show data type assistant button enables this parameter.
Selecting Fixed point from the Mode list enables the following parameters:
Signed
Scaling
Word length
Specify data type override mode for this signal.
Default: Inherit
Inherits the data type override setting from its context, that is, from the block, Simulink.Signal object or Stateflow chart in Simulink that is using the signal.
Ignores the data type override setting of its context and uses the fixed-point data type specified for the signal.
The ability to turn off data type override for an individual data type provides greater control over the data types in your model when you apply data type override. For example, you can use this option to ensure that data types meet the requirements of downstream blocks regardless of the data type override setting.
This parameter appears only when the Mode is Built in or Fixed point.
Specify whether the fixed-point data is signed or unsigned.
Default: Signed
Selecting Fixed point from the Mode list enables this parameter.
Specify the bit size of the word that holds the quantized integer.
Default: 16
Minimum: 0
Maximum: 32
Large word sizes represent large values with greater precision than small word sizes.
Selecting Fixed point from the Mode list enables this parameter.
Specify the method for scaling your fixed-point data to avoid overflow conditions and minimize quantization errors.
Default: Integer
The Scaling list has only one item for you to select.
Selecting Fixed point from the Mode list enables this parameter.
Direct Feedthrough | Yes |
Sample Time | Specified in the Sample time parameter |
Scalar Expansion | No |
Dimensionalized | Yes |
Multidimensionalized | Yes |
Zero-Crossing Detection | No |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |