Solve Overdetermined Linear System

조회 수: 116 (최근 30일)
Chloe
Chloe 2019년 10월 6일
댓글: Rena Berman 2019년 10월 28일
Hi,
I have read that an overdetermined system is one with more rows (equations) that columns(unknowns).
I believe that an overdetermined system is typically one that is not solvable, unless one of the equations in the linear system is a linear combination of the other.
However, looking at the code below, it doesn't seem that any of the equations is a linear combination of the others. However, matlab still solves the system once
the script is executed. Any explanation is appreciated.
clear all
% Specify a system where the number of unknowns is less than the number of
% equations
comment='starts here'
disp(comment)
A=[ 2 2 -2; 6 4 4; 10 8 6; 11 15 9];
v=[10 2 8 20]';
C=A\v
  댓글 수: 1
Rena Berman
Rena Berman 2019년 10월 28일
(Answers Dev) Restored edit

댓글을 달려면 로그인하십시오.

채택된 답변

Bruno Luong
Bruno Luong 2019년 10월 6일
편집: Bruno Luong 2019년 10월 6일
For overdetermined system the "\" returns least-square solution, meaning it doesn't solve exactly your system, but returnes the solution that minimizes
norm( A*C - v, 2).
To persuade this is the case, you can multiply A*C and verifies it does not match v
>> A*C
ans =
9.9655
1.8368
8.1255
19.9812
>> norm(A*C-v, 2)
ans =
0.2096
This is the best "MATLAB" can do. You can try any other C, and you won't ever get any better than 0.2096.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Systems Of Linear Equations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by