MATLAB Answers

How do I plot error bar at only one location ?

1 view (last 30 days)
HABILA
HABILA on 11 Dec 2019
Commented: HABILA on 11 Dec 2019
Suppose, I have this two data. Here the errorbar is plotted for every v. But I need to put error bat at only one particulat index v(4).
u = 1:10:100;
v = [20 30 45 40 60 65 80 75 95 90];
err = 8*ones(size(v));
errorbar(u,v,err)

  0 Comments

Sign in to comment.

Accepted Answer

Stijn Haenen
Stijn Haenen on 11 Dec 2019
just plot first without errorbar and than with errorbar for only the 4th value:
plot(u,v,'b')
hold on
errorbar(u(4),v(4),err(4),'b')

  1 Comment

Sign in to comment.

More Answers (0)

Sign in to answer this question.