Main Content

信頼限界をもつライン プロット

信頼限界を描画する関数 fill およびデータ点を描画する関数 plot を使用して、信頼限界をもつプロットを作成します。ドット表記構文 object.PropertyName を使用して、プロットの外観をカスタマイズします。

x = 0:0.2:10;                     
y = besselj(0, x);

xconf = [x x(end:-1:1)] ;         
yconf = [y+0.15 y(end:-1:1)-0.15];

figure
p = fill(xconf,yconf,'red');
p.FaceColor = [1 0.8 0.8];      
p.EdgeColor = 'none';           

hold on
plot(x,y,'ro')
hold off