フィルターのクリア

How to extrapolate the fit line and uncertainty bands?

2 ビュー (過去 30 日間)
Bum
Bum 2013 年 3 月 21 日
I used the function 'fit' and 'predint' to plot the data, fit line and 95% bound from the year 1965 to 1990 as below. How can I extrapolate these lines to the year 2100?
x=[1:27]';
for i=1:12
subplot(3,4,i);
y_var=RCM_Var_time{i,1}(:,1);
fitresult=fit(x,y_var,'poly1');
a=coeffvalues(fitresult);
p11=predint(fitresult,x,0.95,'functional','on');
if (a(1,1)>0)
plot(fitresult,'b',x,y_var,'.k');
else
plot(fitresult,'r',x,y_var,'.k');
end
hold on;
plot(x,p11,'m-.');
hold on;
set(gca,'XTick',1:5:30);
set(gca,'XTickLabel',{1965:5:1995});
set(gca,'YTick',0:0.5:3.5);
set(gca, 'YLim', [0 3.5])
title([Month{1,i}]);
xlabel([]);
ylabel('Q4 Variance');
legend off;
end

回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by