Does lsqlin give different solution if the rows of C matrix and d matrix are changed accordingly?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Thanigaivel Raja T
le 22 Août 2016
Commenté : Thanigaivel Raja T
le 22 Août 2016
I have two curves(or datasets) which are to be fitted of the form, C1.x=d1 and C2.x=d2, where x is the solution which should satisfy both equations. Here C1 has several subsets of data, for example C1=[c11; c12; c13...] with an associated fit data d1=[d11; d12; d13;..]. Similarly C2 has several subsets of data, for example C2=[c21; c22; c23...] with an associated fit data d2=[d21; d22; d23;..]. So I had clubbed both C1 and C2 into a single matrix and d1 and d2 into single matrix, so that I have the form C=[C1;C2] =[c11;c12;c13;c21;c22;c23] and d=[d1;d2]=[d11;d12;d13;d21;d22;d23]. Then upon solving using lsqlin, I get a solution 'x'.
Alternatively, upon merging the C1 and C2 in different manner, say C=[c11;c21;c12;c22;c13;c23] and correspondingly reordering d as d=[d11;d21;d12;d22;d13;d23] and then solving using lsqlin, I get a solution 'x'.
The solution 'x' for both the cases seemed to be different for my problem in hand. So I tried it with a small random dataset, but here the solution 'x' was same in both cases.
Now I in confusion, if changing the rows of the C matrix and correspondingly changing the d matrix, yield the same solution or not?
Or, can't lsqlin be used for curve fitting multiple independent datasets?
Thanks in advance.
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Linear Least Squares dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!