Simple least square method

5 Ansichten (letzte 30 Tage)
RAHIM KEF
RAHIM KEF am 11 Apr. 2018
Bearbeitet: John D'Errico am 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 Kommentar
John D'Errico
John D'Errico am 11 Apr. 2018
Bearbeitet: John D'Errico am 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?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by