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

1 回表示 (過去 30 日間)
Hassan
Hassan 2013 年 8 月 28 日
_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:
|
|
|
-------

採用された回答

the cyclist
the cyclist 2013 年 8 月 28 日
編集済み: the cyclist 2013 年 8 月 28 日
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 件のコメント
Hassan
Hassan 2013 年 8 月 29 日
編集済み: Hassan 2013 年 8 月 29 日
_**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 ?***_*
the cyclist
the cyclist 2013 年 8 月 29 日
r = [1; 2; 3; 4];
or
r = [1 2 3 4]';

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeErrorbars についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by