%% 三次指数平滑
clc,clear
load('yx.mat') %原始数据以列向量的方式存放
yt=yx; n=length(yt);
alpha=0.9; st1_0=mean(yt(1:3)); st2_0=st1_0; st3_0=st1_0;
st1(1)=alpha*yt(1)+(1-alpha)*st1_0;
st2(1)=alpha*st1(1)+(1-alpha)*st2_0;
st3(1)=alpha*st2(1)+(1-alpha)*st3_0;
for i=2:n
st1(i)=alpha*yt(i)+(1-alpha)*st1(i-1);
st2(i)=alpha*st1(i)+(1-alpha)*st2(i-1);
st3(i)=alpha*st2(i)+(1-alpha)*st3(i-1);
end
st1=[st1_0,st1];
st2=[st2_0,st2];
st3=[st3_0,st3];
a=3*st1-3*st2+st3;
b=0.5*alpha/(1-alpha)^2*((6-5*alpha)*st1-2*(5-4*alpha)*st2+(4-3*alpha)*st3);
c=0.5*alpha^2/(1-alpha)^2*(st1-2*st2+st3);
yhat=a+b+c;
yhat=yhat';
时间序列数据_进行数据预测_如预测下一年度的销售额、预测股票价格的走势等_matlab
版权申诉
![star](https://csdnimg.cn/release/downloadcmsfe/public/img/star.98a08eaa.png)
![avatar](https://profile-avatar.csdnimg.cn/2588731bac124b388c4a87fce0b1493c_m0_53407570.jpg!1)
![avatar-vip](https://csdnimg.cn/release/downloadcmsfe/public/img/user-vip.1c89f3c5.png)
阿里matlab建模师
- 粉丝: 3385
- 资源: 2788
最新资源
- matlab画图教程.docx
- 基于MNIST数据集卷积神经网络实现手写数字识别(GUI).zip
- 一个MATLAB仿真设计的例子,演示如何对一个模拟信号进行傅里叶变换:
- 10-Hadoop(HA)V4.0.docx
- 基于MNIST数据集卷积神经网络实现手写数字识别(GUI)源码+文档说明
- 自定义函数在后缀表达式中的应用与实现
- 使用python爬取天气信息(包括历史天气数据)_python爬取天气数据-CSDN博客.html
- 毕设项目:高校学生宿舍管理系统的设计与实现(ASP.NET+源代码+论文)
- Navicat入门教程.docx
- os.path.join(root, 'test-average-edge-map'
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)