Simple least square method

5 ビュー (過去 30 日間)
RAHIM KEF
RAHIM KEF 2018 年 4 月 11 日
編集済み: John D'Errico 2018 年 4 月 11 日
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 件のコメント
John D'Errico
John D'Errico 2018 年 4 月 11 日
編集済み: John D'Errico 2018 年 4 月 11 日
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?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by