MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   如何从ARX模型中获得残差的完整向量 (https://www.labfans.com/bbs/showthread.php?t=23737)

poster 2019-12-10 20:48

如何从ARX模型中获得残差的完整向量
 
我从系统标识工具箱中使用了[URL="http://www.mathworks.com/access/helpdesk/help/toolbox/ident/ref/arx.html"]ARX[/URL]函数,然后使用[URL="http://www.mathworks.com/access/helpdesk/help/toolbox/ident/ref/resid.html"]RESID[/URL]函数,但是产生的残差为:

0 0 0 5 6 8 7 8 零的数量=滞后的数量,我需要一个残差的完整向量



[B]回答:[/B]

阶数为N的[URL="http://en.wikipedia.org/wiki/Autoregressive_model"]AR模型[/URL]需要前N个值来预测下一个,这就是为什么不预测前N个的原因。您始终可以在向量开始时填充矢量(通过复制或零填充),例如:

load twotankdata order = 5; m = arx(y, order); r = resid([y(1:order);y], m); r = r(order+1:end);

[url=https://stackoverflow.com/questions/3356322]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 01:02

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.