24小时热门版块排行榜    

查看: 2850  |  回复: 1

wallyy1007

金虫 (小有名气)

[求助] matlab如何画散点连线图的置信带(见图)

有了解这种图怎么做的,感谢!!

snapshot1.png
回复此楼

» 收录本帖的淘帖专辑推荐

绘图

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

csgt0

荣誉版主 (著名写手)

彩色挂图

【答案】应助回帖

感谢参与,应助指数 +1
CODE:
load census
% Calculate fit parameters
[p,ErrorEst] = polyfit(cdate,pop,2);
% Evaluate the fit and the prediction error estimate (delta)
[pop_fit,delta] = polyval(p,cdate,ErrorEst);
% Plot the data, the fit, and the confidence bounds
plot(cdate,pop,'+',...
     cdate,pop_fit,'g-',...
     cdate,pop_fit+2*delta,'r:',...
     cdate,pop_fit-2*delta,'r:');
grid on

figure
area(cdate,pop_fit+2*delta,'FaceColor','blue')
hold on
area(cdate,pop_fit-2*delta,'FaceColor','white')
plot(cdate,pop,'+',...
     cdate,pop_fit,'g-',...

showmethemoney
2楼2012-12-14 16:23:42
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 wallyy1007 的主题更新
信息提示
请填处理意见