Warning: Matrix is singular to working precision.

3 ビュー (過去 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 Center および File ExchangeLinear Algebra についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by