Computing error for solution to linear equation
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Tevin
am 19 Dez. 2022
Bearbeitet: John D'Errico
am 8 Jan. 2023
I want to solve a linear equation Ax= b, using least-squares. I also need to find the error in the solution. I am not sure how to find the error.
Error is;
𝐸=‖𝐴𝒙−𝒃‖^2 =Σ𝜃𝑖^2 where i is index counter
A=[2 0;3 1;4 3];
b=[2;3;4];
x= A\b;
I am not sure how to calculate the error. Can someone help me?
0 Kommentare
Akzeptierte Antwort
Matt J
am 19 Dez. 2022
Bearbeitet: Matt J
am 19 Dez. 2022
x= A\b;
E=norm(A*x-b)^2
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Operating on Diagonal Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!