  Diagonal Matrices 

advertisement
Diagonal Matrices
These are almost band matrices.
Form of the matrix
The matrix to invert in Weighted Fourier Series.doc is of the form
(1)
An,m  A  f n  f m   An  m
Sample numbers are in Periodic Array3.doc - SampleNumbers.
Values in the upper right corner and the lower left corner are beyond –M/2 and
M/2-1. The periodicity condition is that A[j+kM]=A[j]. For M=4, this requires that A[3]
= A[-1], A[-3] = A[1] and that A[2] = A [-2]. In this case the matrix of indices becomes
0 1 2 3  0 1 2 1 
1 0 1 2   1 0 1 2 

 

(2)



2 1 0 1 2 1 0 1
3 2 1 0   1 2 1 0 
In this specific case the indices are {-2, -1, 0, 1}. All other indices are reached by adding
k4 until one of these is found.
Defining the inverse
 A111 A12 1 A131 A14 1   A11
 1

A22 1 A231 A24 1   A21
 A21
 1

A32 1 A331 A34 1   A31
 A31
 A411 A42 1 A431 A44 1   A41
The inverse is defined by
M / 2 1

n  M / 2
Am1,n An , j   m , j
A12
A13
A22
A32
A42
A23
A33
A43
A14  1
A24  0

A34  0
A44  0
0 0 0
1 0 0
 (3)
0 1 0
0 0 1 
(4)
If A-1, like A is assumed to be a function of the coordinate differences, this becomes
M / 2 1

n  M / 2
A1  m  n  A  n  j    j ,m
(5)
The original derivation took j =0 OriglDerOfAinv.doc.
Define the transform pair of A over M points as
iT
m
ti 
; fm 
M
T
M / 2 1
1
a i  
 A  m exp   j 2 f m ti  (6)
T m  M / 2
T M / 21
 a i  exp  j 2 f m ti 
N i  M / 2
This requires that A[m+M]=A[m]. Then
A  m 


 m  n  i  M / 21
n  j  k 
T 2 M / 21 M / 21 1
a
i
exp

j
2




  a  k  exp   j 2
   j ,m (7)


2
N
N
M n M / 2 i  M / 2

k  M / 2


Evaluate the sum over n first
T 2 M / 21 1 M / 21
jk  mi  M / 21

a
i
a
k
exp
j
2








  exp  j 2  i  k  n    j ,m (8)
N n M / 2
M 2 i  M / 2

k  M / 2
The sum on n is Mi,k
T 2 M / 21 1 M / 21
jk  mi 

a i   a  k  exp  j 2

  i ,k   j ,m
M i  M / 2
N 

k  M / 2
So that the sum on k is easy to evaluate, leading to

 j  m i 
T 2 M / 21 1
a i a i  exp  j 2
   j ,m

M i  M / 2
N


For a-1[i]=1/(T2 a[i]), this is satisfied.
This is the equation used to test the inversion in MatInvFFT.doc
The –T/2 to T/2 range is treated in ..\Fourier\Symmetric range.doc The zip
..\Fourier\for\symfft.zip contains the relevant fft code. This code is modified here to have
input from an unformatted file and output to an unformatted file .
Operations required
Using
1 N / 21
 A  f m  exp   j 2 f m t j 
T m  N / 2
1
a 1  t j   N / 21
T  A  f m  exp   j 2 f m t j 
a t j  
(9)
(10)
m  N / 2
Or




1
1

 exp  j 2 f m t j 
(11)
A1  f m  

M j  M / 2  N / 21

  A  f m  exp   j 2 f m t j  
 m N / 2

This is an FFT from A to a, then a division and finally an FFT from a-1 to A-1. The time
required goes as 2Mlog(M)
M / 2 1
Download