Prev: My program is somewhat doing what I ask, but not to the extant I want
Next: Wavelet Scalar Quantization Code
From: Walter Roberson on 10 Aug 2010 16:07 Mohammad wrote: > Here is a simple program that does Gaussian elimination: > > for j=2:r, > for i=j:r, > mat(i,:) = mat(i,:) - mat(j-1,:)*mat(i,j-1)/mat(j-1,j-1); > end > end You are not doing any pivoting or column exchange or row exchange or otherwise attempting to reduce numerical errors. It is not surprising that your answers are not good especially when you have larger arrays. By n = 230, you should expect round off error if the absolute value of your coefficients are less than about 0.85 or greater than about 1.17 . By the way, what answer are you expecting if some mat(j-1,j-1) comes out as 0? |