<< circshift | FOSSEE_Signal_Processing_Toolbox | cmorwavf >>

FOSSEE_Signal_Processing_Toolbox >> FOSSEE_Signal_Processing_Toolbox > clustersegment

# clustersegment

Calculate boundary indexes of clusters of 1’s.

### Syntax

    contRange = clustersegment(xhi)

### Parameters

xhi:

  Scalar, vector, or matrix. Input containing clusters of 1s.

contRange:

  Cell array. Size 1 by Np, where Np is the number of rows in `xhi`. Each element contains two rows indicating the initial and end indices of clusters of 1s.

### Description

This function calculates the boundary indexes of clusters of 1’s in the input `xhi`. The output `contRange` is a cell array where each element corresponds to a row in `xhi` and contains the start and end indices of clusters of 1s. Indexing starts from 1.

### Examples

    y = clustersegment([0, 1, 0, 0, 1, 1])

Report an issue
<< circshift | FOSSEE_Signal_Processing_Toolbox | cmorwavf >>