필터 지우기
필터 지우기

Warning: Matrix is singular to working precision.

조회 수: 1 (최근 30일)
Maxime Leonard
Maxime Leonard 2021년 8월 11일
답변: Chunru 2021년 8월 11일
writing a 5x5 matrix for spatial analytic geometry. the goal is to calculate for 5 unknown forces using the numbers an excel document has provided. i am getting an error message saying "Matrix is singular to working precision." i am very new to matlab, excuse me if it has a simple solution.
clc
%axial/corner weight
syms F1 F2 F3 F4 F5
Fb= 0;
Fcw = 1172.112806;
Fn = 689.4781211;
A=[1 1 1 1 0 ; 1 1 1 1 1 ; -1 -1 -1 -1 1 ;-778.8791468 -346.4077963 -149.2503011 -149.2503011 -163.019189 ; 16.28468788 201.1553234 34.19171497 34.19171497 115.3981707 ];
x=[F1 ; F2 ; F3 ; F4 ; F5]
b=[-Fb ; -Fcw ; -Fn ; 0 ; 0];
x=A\b;

답변 (2개)

Fabio Freschi
Fabio Freschi 2021년 8월 11일
편집: Fabio Freschi 2021년 8월 11일
The matrix is singular because the first three rows are linearly dependent. For example you can obtain row 1 as
I guess there is something wrong in your formulation.
BTW: you don't need to use the symbolic toolbox here, because all entries of A and b are numeric. Symply get x from the solution of the system
% params
Fb= 0;
Fcw = 1172.112806;
Fn = 689.4781211;
% (singular!) coefficient matrix
A=[1 1 1 1 0 ; 1 1 1 1 1 ; -1 -1 -1 -1 1 ;-778.8791468 -346.4077963 -149.2503011 -149.2503011 -163.019189 ; 16.28468788 201.1553234 34.19171497 34.19171497 115.3981707 ];
% rhs
b=[-Fb ; -Fcw ; -Fn ; 0 ; 0];
% solution
x=A\b;

Chunru
Chunru 2021년 8월 11일
A=[1 1 1 1 0 ; 1 1 1 1 1 ; -1 -1 -1 -1 1 ;-778.8791468 -346.4077963 -149.2503011 -149.2503011 -163.019189 ; 16.28468788 201.1553234 34.19171497 34.19171497 115.3981707 ];
A
A = 5×5
1.0000 1.0000 1.0000 1.0000 0 1.0000 1.0000 1.0000 1.0000 1.0000 -1.0000 -1.0000 -1.0000 -1.0000 1.0000 -778.8791 -346.4078 -149.2503 -149.2503 -163.0192 16.2847 201.1553 34.1917 34.1917 115.3982
Your matrix A has at least two linearly dependent colomns (3 & 4). Therefore the matrix is singular and the inverse cannot be evaluated. Or Ax=b has no solution.

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by