<< pulseperiod | FOSSEE_Signal_Processing_Toolbox | pulsewidth >>

FOSSEE_Signal_Processing_Toolbox >> FOSSEE_Signal_Processing_Toolbox > pulsesep

# pulsesep

This function estimate pulse separation between bilevel waveform pulses.

### Syntax

    s=pulsesep(x)
    s=pulsesep(x, Fs)
    s=pulsesep(x, t)
    s=pulsesep (x, t, 'Polarity', pol)
    s=pulsesep(x, t, 'MidPercentReferenceLevel', N )
    s=pulsesep(x, t, 'Tolerance', M)
    s=pulsesep(x, t,'StateLevels', [O 1])
    [s initialcross finalcross nextcross midreference]=pulsesep(x)
    [s initialcross finalcross nextcross midreference]=pulsesep(x, Fs)
    [s initialcross finalcross nextcross midreference]=pulsesep(x, t)
    [s initialcross finalcross nextcross midreference]=pulsesep(x, t, 'Polarity', pol)
    [s initialcross finalcross nextcross midreference]=pulsesep(x, t, 'MidPercentReferenceLevel', N )
    [s initialcross finalcross nextcross midreference]= pulsesep(x, t, 'Tolerance', M)
    [s initialcross finalcross nextcross midreference]= pulsesep(x, t,'StateLevels', O)
    [s initialcross finalcross nextcross midreference]= pulsesep(x, t,'StateLevels', O, 'fig', on or off)

### Parameters

x:

  real vector.

Fs:

  specifies the sample rate, Fs, as a positive scalar, where the first sample instant corresponds to a time of zero.

t:

  defiene instant sample time t as vector with same length of x, or specifies the sample rate, t, as a positive scalar.

Polarity:

  specify the polarity of the pulse as either 'positive' or 'negative', where the default value is 'positive'

MidPercentReferenceLevel:

  specify the mid percent reference leves as a percentage, default value of N is 50.

Tolerance:

  define the tolerance value as real scaler value, where default value of M is 2.0.

StateLevels:

  define the lower and upper state levels as two element real vector.

fig:

  specify the logical input value to display figure as one of 'on' or 'off', where the default input in 'off'.

s:

  returns a vector of differences between the mid-crossings of each final negative-going transition of every positive-polarity pulse and the next positive-going transition.

initialcross:

  returns a vector of initial cross values of bilevel waveform transitions X

finalcross:

  returns a vector of final cross values of bilevel waveform transitions X

nextcross:

  returns a vector of next cross values of bilevel waveform transitions X

midreference:

  return mid reference value corrosponding to mid percenr reference value.

### Examples

    x = fscanfMat("macros/pulsedata_x.txt");
    t = fscanfMat("macros/pulsedata_t.txt");
    clf
    p = pulsesep(x,t,'fig','ON')
    // also it generates a plot of pulse with pulse separation

### See also

### Authors

- Jitendra Singh

Report an issue
<< pulseperiod | FOSSEE_Signal_Processing_Toolbox | pulsewidth >>