<< schurrc | FOSSEE_Signal_Processing_Toolbox | sftrans >>

FOSSEE_Signal_Processing_Toolbox >> FOSSEE_Signal_Processing_Toolbox > seqperiod

# seqperiod

Calculates the period of a sequence

### Syntax

    [p,num]=seqperiod(x)

### Parameters

x:

  A vector matrix or n-dimensional array

### Description

[p,num]=seqperiod(x) Returns an integer p such that x(1:p) is the smallest subsequence that repeats in x The number of times the subsequence repeats is returned in num (may not be an integer) Repetitions may be incomplete at the end of the sequence but no breaks are permitted between repetitions If there is no subsequence that repeats in x then p=length(x) If x is a matrix or n-dimesnional array, the function operates along the first non-singleton dimension of x

### Examples

    x = [4 0 1 5;
    1 1 2 5;
    2 0 3 5;
    3 1 1 5]
    p = seqperiod(x)

### Authors

- Ankur Mallick

Report an issue
<< schurrc | FOSSEE_Signal_Processing_Toolbox | sftrans >>