This is where navigation should be.

PHEAVISIDE - Periodic Heaviside function

Usage

h=pheaviside(L);

Description

pheaviside(L) returns a periodic Heaviside function. The periodic Heaviside function takes on the value 1 for indices corresponding to positive frequencies, 0 corresponding to negative frequencies and the value .5 for the zero and Nyquist frequencies.

To get a function that weights the negative frequencies by 1 and the positive by 0, use involute(pheaviside(L))

As an example, the pheaviside function can be use to calculate the Hilbert transform for a column vector f:

h=2*ifft(fft(f).*pheaviside(length(f)));