<< meyeraux | FOSSEE_Signal_Processing_Toolbox | modulate >>

FOSSEE_Signal_Processing_Toolbox >> FOSSEE_Signal_Processing_Toolbox > midcross

# midcross

This function estimate midcross values of real vector X.

### Syntax

    midcrossvalue=midcross(x)
    midcrossvalue=midcross(x, Fs)
    midcrossvalue=midcross(x, t)
    midcrossvalue=midcross(x, t, 'MidPercentReferenceLevels', N )
    midcrossvalue=midcross(x, t, 'Tolerance', M)
    midcrossvalue=midcross(x, t,'StateLevels', O)
    [midcrossvalue midreference]=midcross(x)
    [midcrossvalue midreference]=midcross(x, Fs)
    [midcrossvalue midreference]=midcross(x, t)
    [midcrossvalue midreference]= midcross(x, t, 'MidPercentReferenceLevel', N )
    [midcrossvalue midreference]= midcross(x, t, 'Tolerance', M)
    [midcrossvalue midreference]= midcross(x, t,'StateLevels', O)
    [midcrossvalue midreference]= midcross(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

MidPercentReferenceLevels:

  specify the midpercentreferenceleves 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'.

midcrossvalues:

  return the midcross values

midreference:

  return the midrefence values.

levels:

  return statelevels values.

t:

  return the instant sample time.

tolerance:

  retunr the tolerance value

Tinput:

  return t value, which given as input parameter.

### Examples

    x=[1.2, 5, 10, -20, 12]
    t=1:length(x)
    midcrossvalue=midcross(x, t)

### Authors

- Jitendra Singh

Report an issue
<< meyeraux | FOSSEE_Signal_Processing_Toolbox | modulate >>