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]  [Comment on this page via email]

``Mathematics of the Discrete Fourier Transform (DFT), with Audio Applications --- Second Edition'', by Julius O. Smith III, W3K Publishing, 2007, ISBN 978-0-9745607-4-8
Copyright © 2024-04-02 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA