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; mps(spec) abs(mps(spec)) ifft(spec) ifft(mps(spec))
Matlab diary: tmps.d
Matlab listing: mps.m