gpt4 book ai didi

matlab - 如何在 Matlab 中定义错误栏

转载 作者:太空宇宙 更新时间:2023-11-03 20:17:06 25 4
gpt4 key购买 nike

我想为 matlab 定义两端的误差线。通常,matlab 的例子是 http://matlab.izmiran.ru/help/techdoc/ref/errorbar.html其中误差条将采用标准偏差 (E) 并使其两端相等(对称)。

除了绘制精确点 (x,y) 之外,我想专门定义两个点。

请指教。谢谢。

最佳答案

正如 Singlet 提到的,errorbar 的 L 和 U 参数应该可以完成这项工作:

% Create some example input data.
x = 1:10
y = cumsum( randn(1,10) );
lower = y - ( rand(1,10) );
upper = y + ( rand(1,10) );

% Convert absolute lower and upper bounds into the relative values
% values that are expected by the errorbar function.
L = y - lower;
U = upper - y;

figure(1);
clf;
hold('on');
plot( x, y, 'b-' );
errorbar( x, y, L, U, 'r', 'Marker', 'none', 'LineStyle', 'none' );

关于matlab - 如何在 Matlab 中定义错误栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3748310/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com