MATLAB 如何画水平误差棒

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MATLAB 如何画水平误差棒相关的知识,希望对你有一定的参考价值。

errorbar(x,y,e)只能画竖直误差棒,能给个既有水平误差棒也有竖直方向误差棒的小例子吗

参考技术A errorbar(x,y,yneg,ypos,xneg,xpos) plots y versus x and draws both horizontal and vertical error bars. The yneg and ypos inputs set the lower and upper lengths of the vertical error bars, respectively. The xneg and xpos inputs set the left and right lengths of the horizontal error bars.
嘿我也是有这个需要正好查到了,不过四年过去了你可能已经早知道答案了
参考技术B x1=0:1:10;
y0=3*x1.^2+2*x1+6;
z=0:0.001:10;
y=spline(x1,y0,z);
y1=interp1(x1,y0,z);
plot(x1,y0,z,y,z,y1,'-r');
N=length(z);
RMES=sqrt(sum((y1-y).^2)/(N-1))
RMES =

0.5477追问

误差棒是这样一个东西,但是我只会画这种数值的,水平的我不会

如何在matlab中的水平线上画一条垂直线?

【中文标题】如何在matlab中的水平线上画一条垂直线?【英文标题】:How can I draw a vertical line upon the horizontal lines in matlab? 【发布时间】:2017-05-23 05:01:41 【问题描述】:

我想在Matlab中在并发的水平线上画一条垂直线,并显示垂直线与水平线相交的坐标。我在这里给出一个图,我想写一个代码,让它先画一条线,然后自动显示交点坐标。

【问题讨论】:

请提及您目前所拥有的。水平线的方程?你想在哪里画垂直线?存在无数种解决方案。 【参考方案1】:
L1 =  [0.7290    0.2163
    0.2026    0.9763] ; % line 1 coordinates 
L2 =   [0.5932    0.9677
    0.3044    0.8960] ;  % line 2 coordinates 

figure(1)
hold on
plot(L1(1,:),L1(2,:),'r')
plot(L2(1,:),L2(2,:),'b')
%% Get intersection
P = InterX(L1,L2) ;
%
plot(P(1),P(2),'*r')
%% Show points
text(P(1),P(2),num2str(P)) ;

从链接下载函数InterX: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections?focused=5165138&tab=function

【讨论】:

感谢您的回答。但我想在一张图像上做,它有一些并发的水平线。 是的..可以做到..你有那些水平线的坐标吗? 兄弟,我在应用霍夫变换后得到了这些行。那么我可以从霍夫变换中得到它吗?基本上,现在我想应用一种算法,使垂直线从左向右流动,并在与图像水平线相交时标记交点。如果它显示交点上的坐标,这对我来说也很好。

以上是关于MATLAB 如何画水平误差棒的主要内容,如果未能解决你的问题,请参考以下文章

matlab,这个图怎么画

matlab用代码生成的图片如何显示误差系数

MATLAB | 绘图复刻 | 折线图+误差棒+柱状图+散点抖动+灰色背景+图片叠加

MATLAB | 绘图复刻 | 折线图+误差棒+柱状图+散点抖动+灰色背景+图片叠加

matlab如何求一副图像的信噪比SNR与均方根误差RMSE

matplotlib可视化番外篇bar()--带误差棒的柱状图