필터 지우기
필터 지우기

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 CenterFile Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by