Warning: Matrix is singular to working precision.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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;
0 comentarios
Respuestas (2)
Fabio Freschi
el 11 de Ag. de 2021
Editada: Fabio Freschi
el 11 de Ag. de 2021
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;
0 comentarios
Chunru
el 11 de Ag. de 2021
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
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.
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!