Projection Example 2 Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Projection Example 2

Let X and PX be defined as Example 1, but now let

>> y = [1;-1;1]
y =

   1
  -1
   1

>> yX = PX * y
yX =

   1.33333
  -0.66667
   0.66667

>> yX' * (y-yX)
ans = -7.0316e-16

>> eps
ans =  2.2204e-16

In the last step above, we verified that the projection yX is orthogonal to the ``projection error'' y-yX, at least to machine precision. The eps variable holds ``machine epsilon'' which is the numerical distance between $ 1.0$ and the next representable number in double-precision floating point.


Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

[How to cite this work] [Order a printed hardcopy]

``Mathematics of the Discrete Fourier Transform (DFT), with Music and Audio Applications'', by Julius O. Smith III, W3K Publishing, 2003, ISBN 0-9745607-0-7.
Copyright © 2007-02-02 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA  [Automatic-links disclaimer]