Error Reduction using a Preconditioner for Linear System Ax =b
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I am trying to solve the Ax =b for a non linear system, my A matrix is 10x4 complex double and b matrix is 10x1 double
A matrix :
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/352037/image.jpeg)
b matrix :
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/352040/image.jpeg)
I already have the original values of x and they are
x_original = [800000000;200000000;10000;10000]; % coefficients to find
I need to solve the system such that the values of x I find are close to x_original. The system is badly scaled and I need to use a pre conditioner.
Does anyone knows how to make a good pre conditioner ? or how to solve this problem.
I have done this till far
Pre_Conditioner = [1;1;1;1;1;1;1;1;1;1].^(-1);
A = bsxfun(@times,A,Pre_Conditioner);
b = Pre_Conditioner.*b;
% Solve the equation Ax = b using Least Squares Method
% Numerical Method
x_2 = inv(A.'*A)*A.'*b; % Least Square Estimation
x_2 = abs(x_2);
x_original = [800000000;200000000;10000;10000]; % coefficients to find
% Error calculation
for i =1:1:size(x_original,1)
error_percent(i,1) = (abs((x_original(i)-x_2(i)))/x_original(i))*100
end
Does anybody know...?
0 comentarios
Respuestas (1)
Rishabh Mishra
el 2 de Sept. de 2020
Editada: Rishabh Mishra
el 2 de Sept. de 2020
Hi,
I would suggest you use following preconditioner column vectors
Pre_Conditioner = [1e-9;1e-9;1e-9;1e-9;1e-9;1e-9;1e-9;1e-9;1e-9;1e-9].^(-1);
To simply put, the above statement can be simplified as:
Pre_Conditioner = 1e9
Additionally, I would advise you to use any 4 rows (as number of unknown variables = 4) from the ‘A’ matrix to evaluate the solution of the system of linear equations.
0 comentarios
Ver también
Categorías
Más información sobre Ordinary Differential Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!