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!
