我觉得daly555说得很对,误差只能是计算值跟实际值的比较。楼主的意思可能是想要知道模型的精确度,不妨参考灰色预测模型的c检验值和p检验值法,如果p>0.95 & c<0.35,那么此模型还是不错的。具体分析如下:$ l) r. o# ?" o% n7 T7 _8 J# K
if p>0.95 & c<0.35$ J L2 c v( J, X0 a7 \ K
disp('The model is good,and the forecast is:'),/ _7 O" | D' f$ F; M. d
disp(Hatx0(length(x0)+T)). ^$ z, A1 w) C7 A: C
elseif p>0.85 & c<0.5% l$ N) I& X' m7 b4 W3 t; y! b
disp('The model is eligibility,and the forecast is:'), . q: o. H) l' N/ g disp(Hatx0(length(x0)+T)) " ~4 V1 n& Q6 }& R0 L. J3 telseif p>0.70 & c<0.65 : N! i" i& O+ X% G, V! \! N disp('The model is not good,and the forecast is:'),6 R }, o7 w; W5 h' Y
disp(Hatx0(length(x0)+T)) 3 N I5 i5 ] O: D ~- }0 Helse p<=0.70 & c>0.65+ _! W0 b$ t+ \2 @/ V* x# ?
disp('The model is bad,and try again') ; U; y k$ @, C) k1 B我有一篇关于灰色模型和指数预测模型matlab程序的帖子,楼主可以参考,共同学习~~