When using ERRORBAR, I like to be able to use a scalar for the error bar length instead of a vector (all error bar of the same length).
If I type like this,
X = 0:pi/10:pi;
Y = sin(X);
E = 0.371;
errorbar(X,Y,E)
MATLAB shows "X, Y and error bars must all be the same length" How do I overcome this?

답변 (1개)

dpb
dpb 2015년 9월 6일

0 개 추천

As similar to the example in the documentation,
E = 0.371*ones(size(x));

댓글 수: 1

dpb
dpb 2015년 9월 7일
I will agree it would be a reasonable enhancement request to expand the input syntax to allow the scalar argument albeit pretty low-priority as the workaround is so trivial...

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터 및 File Exchange에서 Errorbars에 대해 자세히 알아보기

태그

질문:

2015년 9월 6일

댓글:

dpb
2015년 9월 7일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by