I am trying to shade the area between the confidence limits and for that I am using the ciplot function. The x, lower and upper values are all 300*1 vectors. This is my code.
a_99_CI_lower=0.5877*c1+1.5462;
a_99_CI_upper=0.7511*c1+2.5205;
plot(c1,a_99_CI_lower,'k');
hold on
plot(c1,a_99_CI_upper,'k');
ciplot(a_99_CI_lower',a_99_CI_upper,c1)
And the output I get is:
Why does only a part of the bounds is shaded. I want the whole area between the two lines be shaded. There are no NaN values in the vectors. So, what am I doing wrong here?
I tried the example in here and then with the below code all I get is the two black lines
XCI=[c1,fliplr(c1)];
YCI=[a_99_CI_lower,fliplr(a_99_CI_upper)];
fill(XCI,YCI,'g');