Free Books

Matlab listing: tmps.m

Below is the test script (for ease of copy/paste extraction for online viewers). Following is the test script along with its output.

Note that this is a toy example intended only for checking the code on a simple example, and to illustrate how a spectrum gets passed in. In particular, the would-be minimum-phase impulse response computed by this example is clearly not even causal (thus indicating an insufficient spectral sampling density [FFT length]). Moreover, the starting spectrum (a sampled ideal lowpass-filter frequency response) has zeros on the unit circle, so there is no sampling density that is truly sufficient in the frequency domain (no sufficiently long FFT in the time domain).

spec = [1 1 1 0 0 0 1 1]'; % Lowpass cutting off at fs*3/8
format short;

Next Section:
Matlab diary: tmps.d
Previous Section:
Matlab listing: mps.m