Gauss seidel method to solve axb python

broken image

shape #matrix mulitplicationĭef apply ( self, v ): out = ndarray ( self. Here's the TridiagonalMatrix class I used:įrom numpy import * #a tridiagonal matrix classĬlass TridiagonalMatrix : #initialize with 3 numpy arraysĭef _init_ ( self, upper_in, diag_in, lower_in ): self. wav file needs an array of size 12*44100. A sparse matrix class is neccessary to avoid memory

broken image

wav files into arrays is not tooīad in scipy. Third iteration: gauss_seidel_out000002.wavįourth iteration: gauss_seidel_out000003.wav Second iteration: gauss_seidel_out000001.wav Plots of the initial Ax, residual, and FFT of residual:Īfter one iteration the high notes become audible gauss_seidel_out000000.wavĪnd some structure is visible in the spectrum: High pitched notes in b become audible first while at the same timeĪudio of the initial 12 second. Initial guess and write out Ax at each iteration we observe that the If we take b to be a song recording, some white noise as our Will approach b with the high frequency parts of Ax getting close to bįirst.

broken image

Through iterations of Gauss-Seidel the vector Ax

broken image

wav file can be read into anĪrray (call it b) of length 44100.

broken image