Difference between errorbar and errorbarxy (function)
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello,
I'm calculating and plotting a mean-Values and standard deviation:
If I plot it via errorbar, I get:
....
errorbar(M1(:,2),M1(:,1),S1(:,2),S1(:,1),'-o','both','LineWidth',1.5,'MarkerFaceColor','cyan','MarkerSize',10,'MarkerEdgeColor','black','DisplayName',label1{1})
....
errorbar(M2(:,2),M2(:,1),S2(:,2),S2(:,1),'-s','both','LineWidth',1.5,'MarkerFaceColor','yellow','MarkerSize',10,'MarkerEdgeColor','black','DisplayName',label2{1})
...
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/327473/image.png)
If I plot with errorbarxy function, I get:
errorbarxy(M1(:,2),M1(:,1),S1(:,2),S1(:,1))
....
errorbarxy(M1(:,2),M1(:,1),S1(:,2),S1(:,1))
....
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/327479/image.png)
Why, I'm getting different line length? I tnink an errorplot has a wrong length, because there are each one value for x-axis and y-axis?! What is the better way to plot main + std?
values are:
M1 =
0.0570 0.9098
0.0860 0.8615
0.7741 0.1542
0.9682 0.0200
0.9874 0.0016
M2 =
0.0591 0.9049
0.2164 0.7222
0.7954 0.1332
0.9703 0.0091
0.9761 0.0082
S1 =
0.0196 0.0220
0.0356 0.0585
0.0349 0.0636
0.0354 0.0347
0.0027 0.0027
S2 =
0.0323 0.0461
0.2140 0.2619
0.2021 0.1885
0.0216 0.0158
0.0171 0.0141
댓글 수: 4
dpb
2020년 7월 6일
>> which -all errorbar
C:\ML_R2019b\toolbox\matlab\specgraph\errorbar.m
errorbar is a built-in method % tall method
>> which -all errorbarxy
'errorbarxy' not found.
>>
errorbarxy is NOT a TMW-supplied function but there is one for the job; my recommendation is to use it.
The FEX submission may be just perfectly fine, but why throw confusion between two functions that may have chosen different input arrangements into the mix besides?
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Errorbars에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!