<< yulewalker | FOSSEE_Signal_Processing_Toolbox | zp2sos >>

FOSSEE_Signal_Processing_Toolbox >> FOSSEE_Signal_Processing_Toolbox > zerocrossing

# zerocrossing

Estimates the points at which a given waveform y=y(x) crosses the x-axis using linear interpolation.

### Syntax

    r = zerocrossing (w, y)

### Parameters

r:

  zero crossing points

y:

  function y=y(x)...the dependant variable

x:

  the independant variable

### Description

This function estimates the points at which a given waveform y = y(w) crosses the x-axis. It uses linear interpolation.

### Examples

    x = linspace(0,1,100);
    y = rand(1,100)-0.5;
    x0= zerocrossing(x,y);
    y0=interp1(x,y,x0)
    plot(x,y,x0,y0,'x')

Report an issue
<< yulewalker | FOSSEE_Signal_Processing_Toolbox | zp2sos >>