24小时热门版块排行榜    

查看: 270  |  回复: 0

小桂子1129

金虫 (正式写手)

[求助] 简单的程序注释,非常感谢!

clear;
close all;
clc;
aa=[259 372 340 220;275 411 353 230;285 428 364 243];
bb=reshape(aa',[],1);
figure,plot(bb,'o-');
title('某地区各季度住院人数(01-03年)');
tt=[1:length(bb)]';
N=length(tt);
figure,autocorr(bb);
p=polyfit(tt,bb,1);
ytrend=polyval(p,tt);
figure,plot(ytrend);
yre=bb./ytrend;
figure,plot(yre);
yy=reshape(yre,4,[]);
ysea=mean(yy');
yper=repmat(ysea,1,3);
ydesea=bb./yper';
p=polyfit(tt,ydesea,1);
tt2=[1:16]';
ytrend2=polyval(p,tt2);
yper=repmat(ysea,1,4);
ypredict=ytrend2.*yper';
figure,plot(tt,bb,'-.*',tt2,ypredict,'-.o');
legend('测量值','预测值')
回复此楼
没有人能随随便便成功
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

智能机器人

Robot (super robot)

我们都爱小木虫

相关版块跳转 我要订阅楼主 小桂子1129 的主题更新
信息提示
请填处理意见