Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Find signal location using similarity search

```
[istart,istop,dist]
= findsignal(data,signal)
```

```
[istart,istop,dist]
= findsignal(data,signal,Name,Value)
```

`findsignal(___)`

`[`

returns the start and stop indices of a segment of the data array,
`istart,istop`

,`dist`

]
= findsignal(`data`

,`signal`

)`data`

, that best matches the search array,
`signal`

. The best-matching segment is such that
`dist`

, the squared Euclidean distance between the
segment and the search array, is smallest. If `data`

and
`signal`

are matrices, then `findsignal`

finds the start and end columns of the region of `data`

that
best matches `signal`

. In that case,
`data`

and `signal`

must have the same
number of rows.

`[`

specifies
additional options using name-value pair arguments. Options include
the normalization to apply, the number of segments to report, and
the distance metric to use.`istart,istop`

,`dist`

]
= findsignal(`data`

,`signal`

,`Name,Value`

)

`findsignal(___)`

without output
arguments plots `data`

and highlights any identified
instances of `signal`

.

If the arrays are real vectors, then the function displays

`data`

as a function of sample number.If the arrays are complex vectors, then the function displays

`data`

on an Argand diagram.If the arrays are real matrices, then the function displays

`signal`

as an image on a subplot and`data`

with the highlighted regions on another subplot.If the arrays are complex matrices, then their real and imaginary parts appear in the top and bottom half of each image.