Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
tayeb ghazi
tayeb ghazi am 20 Nov. 2012
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 :)

Antworten (1)

John Petersen
John Petersen am 21 Nov. 2012
upper = theta*1.05;
lower = theta*0.95;
plot(t,lower,t,theta,t,upper);
  2 Kommentare
tayeb ghazi
tayeb ghazi am 22 Nov. 2012
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 am 28 Nov. 2012
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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by