我觉得daly555说得很对,误差只能是计算值跟实际值的比较。楼主的意思可能是想要知道模型的精确度,不妨参考灰色预测模型的c检验值和p检验值法,如果p>0.95 & c<0.35,那么此模型还是不错的。具体分析如下:2 E4 U: O$ o# {& G+ o, ?& p* D; Y
if p>0.95 & c<0.35: o2 ]2 x: L6 ?& v$ S: y/ |# X8 x
disp('The model is good,and the forecast is:'),/ w& i+ m0 P9 \5 ? t1 }6 X6 [. K' h
disp(Hatx0(length(x0)+T)) 7 m; d+ m; n& Ielseif p>0.85 & c<0.56 \, s. M6 B7 ^7 E- t/ k# @
disp('The model is eligibility,and the forecast is:'), 9 h7 i( u P3 l+ G disp(Hatx0(length(x0)+T)), _8 }8 k- I4 ^3 G' X. e
elseif p>0.70 & c<0.65 ! E4 f0 I7 u: t disp('The model is not good,and the forecast is:'),& M; y6 W0 M5 [5 M/ U; m# b9 z' Z
disp(Hatx0(length(x0)+T)); G, M2 o. s7 c* a4 r% R
else p<=0.70 & c>0.65! ?3 q# A0 y# Y$ q( E: W& o" Z. B
disp('The model is bad,and try again') % [$ W3 o, H0 p4 Z# n* V2 d我有一篇关于灰色模型和指数预测模型matlab程序的帖子,楼主可以参考,共同学习~~