필터 지우기
필터 지우기

plot kalman smoother output vectors with confidence interval!!!!

조회 수: 1 (최근 30일)
tayeb ghazi
tayeb ghazi 2012년 11월 20일
i have a smoothed vector theta(16,T), where T refere to nomber of years . & i would like to plot a row from this vector using a confidence interval of 95%.. my state space model is :
%% yt= Zt*theta(t) + e(t)
%% theta(t)= theta(t-1) + v(t)
how can i visualize confidence interval with my states vectors in a plot
thx for help :)

답변 (1개)

John Petersen
John Petersen 2012년 11월 21일
upper = theta*1.05;
lower = theta*0.95;
plot(t,lower,t,theta,t,upper);
  댓글 수: 2
tayeb ghazi
tayeb ghazi 2012년 11월 22일
if i have a variance-covariance matrix of theta; let this var-cov(16,16,t)
can i use a code like this:??
upper = theta + 2*diag(var-cov);%% 2= statistic t
lower = theta - 2*diag(var-cov);
plot(t,lower,t,theta,t,upper);
John Petersen
John Petersen 2012년 11월 28일
You can't use '-' as a character in a variable name. Matlab sees it as a minus sign. Also keep in mind that t, theta, and var_cov must be the same dimension.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by