my matrix is not square, although i think it is?
Mostra commenti meno recenti
I have set the following least squares method up quickly. I know i am using a nonlinear technique to solve a linear problem, however i just wanted to get it working, before i choose a linear method but aparently my matrices are not square:
i = [1 2 3 4 5];
ti = [2 5 7 11 14];
Estimates3=fminsearch(@functionnumbers,1,options,T0,theta_f);
and the function code
function fnumbers = functionnumbers(params3,i,ti)
k = params3;
v0 = 1 + (k/2)*ti(1)^2/ti(1)
fnumbers = sum(ti.^2*(i/ti-(v0-(k/2)*ti))^2);
cheers
3 Commenti
Sean de Wolski
il 8 Ago 2011
What are T0,options,theta_f for this example?
Sean de Wolski
il 8 Ago 2011
Make sure you're deleting old values too!
Alex
il 8 Ago 2011
Risposta accettata
Più risposte (1)
Alex
il 9 Ago 2011
0 voti
2 Commenti
Walter Roberson
il 9 Ago 2011
In the original equation you had "i" divided by "ti", but in the new equations that division appears to have vanished. It does not appear to me that your old and new equations are equivalent, but it could be that I missed something.
Alex
il 10 Ago 2011
Categorie
Scopri di più su Mathematics in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!