What Kind of Function i have to use to plot errorbar with 2 side only not 4 ??

1 view (last 30 days)
_i wanna plot errorbar with 2 side only not 4 ... and the 2 side have to be one vertical and one horizontal so what function i have to use ? _
like that:
|
|
|
-------

Accepted Answer

the cyclist
the cyclist on 28 Aug 2013
Edited: the cyclist on 28 Aug 2013
The MATLAB function errorbar allows you to separately define the lengths of the upper and lower errors. So, you can set the lower value to be zero.
For example
x = 1:5
y = 2:6;
u = [1 2 1 2 1];
l = zeros(1,5);
figure
errorbar(x,y,l,u)
ylim([0 8])
The herrorbar function ( http://www.mathworks.com/matlabcentral/fileexchange/3963-herrorbar ) that I told you about in an earlier thread similarly allows you to separately define the left and right lengths.
  2 Comments
Hassan
Hassan on 29 Aug 2013
Edited: Hassan on 29 Aug 2013
_**thank you for your helping :)
i wanna ask you about the size of the variable
Ex:
if r = [ 1 2 1 2 1 2 1 ];
and you ask ==> size(r) that will = 1 7
that mean 1 row and 7 columns
nw if i want size(r) = 55 1
how can i write the 55 rows ??
all what i can write is r=[......] that mean columns only ?***_*

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!