Computing error for solution to linear equation
์กฐํ ์: 2 (์ต๊ทผ 30์ผ)
์ด์ ๋๊ธ ํ์
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
์ฑํ๋ ๋ต๋ณ
Matt J
2022๋
12์ 19์ผ
ํธ์ง: Matt J
2022๋
12์ 19์ผ
x= A\b;
E=norm(A*x-b)^2
์ถ๊ฐ ๋ต๋ณ (0๊ฐ)
์ฐธ๊ณ ํญ๋ชฉ
์นดํ ๊ณ ๋ฆฌ
Help Center ๋ฐ File Exchange์์ Linear Algebra์ ๋ํด ์์ธํ ์์๋ณด๊ธฐ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!