Warning: Matrix is close to singular or badly scaled. Results may be inaccurate.

2 次查看(过去 30 天)
i can't get the correct values for this calculation and i get the warning that Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. a=[0,0.38,0.76,1.14,1.52,1.9,2.28,2.66,3.04,3.42,3.8; 0.38,0,0.38,0.76,1.14,1.52,1.9,2.28,2.66,3.04,3.42; 0.76,-0.38,0,0.38,0.76,1.14,1.52,1.9,2.28,2.66,3.04; 1.14,-0.76,-0.38,0,0.38,0.76,1.14,1.52,1.9,2.28,2.66; 1.52,-1.14,-0.76,-0.38,0,0.38,0.76,1.14,1.52,1.9,2.28; 1.9,-1.52,-1.14,-0.76,-0.38,0,0.38,0.76,1.14,1.52,1.9; 2.28,-1.9,-1.52,-1.14,-0.76,-0.38,0,0.38,0.76,1.14,1.52; 2.66,-2.28,-1.9,-1.52,-1.14,-0.76,-0.38,0,0.38,0.76,1.14; 3.04,-2.66,-2.28,-1.9,-1.52,-1.14,-0.76,-0.38,0,0.38,0.76; 3.42,-3.04,-2.66,-2.28,-1.9,-1.52,-1.14,-0.76,-0.38,0,0.38; 3.8,-3.42,-3.04,-2.66,-2.28,-1.9,-1.52,-1.14,-0.76,-0.38,0]; b=[2436009.4;1865655.99; 1295302.6; 724949.2; 154595.8; -415757.6; -986111.0; -1556464.4; -2126817.8; -2667152.6; -3267524.6]; c=a\b
  1 个评论
John D'Errico
John D'Errico 2018-9-15
Sigh.
rank(a)
ans =
2
size(a)
ans =
11 11
rank([a,b])
ans =
3
Go directly to linear algebra 101. Do not pass go. Do not collect $200.
Hint #1: There is no exact solution. And any solution you do get is no better than any other solution.
Hint #2: If you absolutely, positively insist on some "solution", try either pinv or lsqminnorm. But remember there are infinitely many equally bad solutions.
But first, return to linear algebra 101.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear Algebra 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by