Simple least square method

5 visualizzazioni (ultimi 30 giorni)
RAHIM KEF
RAHIM KEF il 11 Apr 2018
Modificato: John D'Errico il 11 Apr 2018
this is my code
i know that theta=phi*inv(phi)*phi*y
b0=1;
a1=1;
u=idinput('sbpa',[0 1],[0 1]);
y=dlsim(b0,[1 a1],u);
u=u(2:end)
for i=1:1:lenght(u)
phi=[y(i) u(i)];
end
theta=phi*inv(phi)*phi*y
  1 Commento
John D'Errico
John D'Errico il 11 Apr 2018
Modificato: John D'Errico il 11 Apr 2018
To be honest, while I accept that you know what you think you know, what you think you know is not actually mathematically valid. Not even that close.
Ow, my head hurts just writing that.
Said differently, some of the things that you think you know as truth are in fact falsehoods.
And of course, your code is hopeless confusing. So I might only try to guess what you really want to do. But I just think I know that. Given that you are mixing vectors y, u, and phi around in a completely random manner, I don't even want to guess.
Let me say only that this:
theta=phi*inv(phi)*phi*y
is NOT a computation of a simple least squares estimator in any way.
Where is that large bottle of Advil when I need it?

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by