Warning: Matrix is close to singular or badly scaled. Results may be inaccurate.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
John D'Errico
le 15 Sep 2018
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.
Réponses (0)
Voir également
Catégories
En savoir plus sur Linear Algebra dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!