Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2024.0.0 - 日本語


errbar

2次元プロットに垂直誤差バーを追加

呼び出し手順

errbar(x,y,em,ep)

引数

x,y,em,ep

同じ大きさの行列.

説明

errbar は二次元プロットに垂直誤差バーを追加します. xおよび y の意味はplot2d におけるものと同じです. em(i,j)ep(i,j) は 値y(i,j)の誤差間隔を意味します: [y(i,j)-em(i,j),y(i,j)+ep(i,j)].

デモを参照するには, コマンド errbar() を入力してください.

// low resolution sinus
x1 = linspace(0, 2*%pi, 10);
y1 = sin(x1);
plot(x1, y1, 'b');

// high resolution sinus
x2 = linspace(0, 2*%pi, 100);
y2 = sin(x2);
plot(x2, y2, 'g');

// display the error between a linear interpolation and x2
x_err = x1(2:$-1);
y_err = y1(2:$-1);
err = y2 - linear_interpn(x2, x1, y1, "periodic");
err_m = zeros(y_err);
err_p = zeros(y_err);
for i = 2:size(x1,'c')-1
    err_m(i-1) = sum(abs(err(x1(i-1) <= x2 & x2 < x1(i)  )));
    err_p(i-1) = sum(abs(err(x1(i)   <= x2 & x2 < x1(i+1))));
end
errbar(x_err, y_err, err_m, err_p);

参照

Report an issue
<< cutaxes 2d_plot fchamp >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Oct 24 14:36:19 CEST 2023