Fitting vector of n length
Ältere Kommentare anzeigen
Hi!
I'm trying to solve a problem involving a least square estimate. When defining input I try to fit my input vector to a following vector, phi which I use in the least square algorithm. My input vector, A, is simply [1xn].
My phi vector looks like this:
[ u(1)^2, u(1), 1;
u(2)^2, u(2), 1;
. .
. .
u(n-1)^2, u(n-1), 1;
u(n)^2, u(n), 1];
Is there an easy and quick way to populate my phi vector using corresponding elements from A, as illustrated?
Thanks!
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Least Squares finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!