DSPRelated.com
Free Books

Matlab diary: tmps.d

Below is the output of the test script with echo on in Matlab.

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

ans =
   1.0000 - 0.0000i
   0.3696 - 0.9292i
  -0.2830 - 0.9591i
   0.0000 - 0.0000i
   0.0000 + 0.0000i
   0.0000 + 0.0000i
  -0.2830 + 0.9591i
   0.3696 + 0.9292i

abs(mps(spec))

ans =
    1.0000
    1.0000
    1.0000
    0.0000
    0.0000
    0.0000
    1.0000
    1.0000

ifft(spec)

ans =
   0.6250
   0.3018 - 0.0000i
  -0.1250
  -0.0518 - 0.0000i
   0.1250
  -0.0518 + 0.0000i
  -0.1250
   0.3018 + 0.0000i

ifft(mps(spec))

ans =
   0.1467 - 0.0000i
   0.5944 - 0.0000i
   0.4280 - 0.0000i
  -0.0159 - 0.0000i
  -0.0381 - 0.0000i
   0.1352 - 0.0000i
  -0.0366 - 0.0000i
  -0.2137 - 0.0000i
(The last four terms above would be zero if the result were causal.)


Next Section:
Generating the PD Plugin
Previous Section:
Matlab listing: tmps.m