Plotting confidence intervals-lines in one graph with means inside
이전 댓글 표시
I need to plot 12 confidence intervals in one graph using MATLAB and each with mean marked inside. Any ideas how I can do it?
I am using a code below for computing confidence intervals:
S=10; E=9; sigma=0.1; r=0.06; T=1;
Dt=1e-3; N=T/Dt; M=2^17;
V = zeros(M,1);
for i=1:M
Sfinal = S*exp((r-0.5*sigma^2)*T+sigma*sqrt(T)*randn);
V(i)=exp(-r*T)*max(Sfinal-E,0);
end
aM=mean(V); bM=std(V);
conf=[aM-1.96*bM/sqrt(M),aM+1.96*bM/sqrt(M)]
You can find an example of what I need in the following picture:

채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Errorbars에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
