error bar from xlsx

5 次查看(过去 30 天)
Hello
I have data from excel and I imported and everything going fine except error bar doesn't work
I have an error bar in column 3, this is the first time I use it.
Thank you in advance.
A=importdata('value.xlsx')
x=A.data(:,2)
b=A.data(:,1)
err=A.date(:,3)
S1=plot(x,b,err,'sk','MarkerFaceColor','k')
error(x,b,err)

采纳的回答

Walter Roberson
Walter Roberson 2019-10-7
The function to plot error bars is errorbar() not error()
  13 个评论
Abdullah Al Alhareth
Actually the excel I uploaded it's not the right one, but the data I have all three column It should be in same order, for example if I sorted x then the data will be missed up. That's why.
Walter Roberson
Walter Roberson 2019-10-7
filename = 'value.xlsx';
A = importdata('value.xlsx');
x = A.data(:,2);
b = A.data(:,1);
err = A.data(:,3);
plot(x, b, 'sk', 'MarkerFaceColor', 'k')
errorbar(x, b, err)

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Errorbars 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by