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

Projection Example 1

>> X = [[1;2;3],[1;0;1]]
X =

   1   1
   2   0
   3   1

>> PX = X * (X' * X)^(-1) * X'
PX =

   0.66667  -0.33333   0.33333
  -0.33333   0.66667   0.33333
   0.33333   0.33333   0.66667

>> y = [2;4;6]
y =

   2
   4
   6

>> yX = PX * y
yX =

   2.0000
   4.0000
   6.0000

Since y in this example already lies in the column-space of X, orthogonal projection onto that space has no effect.


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]