フィルターのクリア

help with plotting with error bars with fit

1 回表示 (過去 30 日間)
franco otaola
franco otaola 2019 年 10 月 10 日
hello,
i can not succed to do a simple thing
1.do a fit of some values x, y
2.have the error bars
3.plot tougether the fit with the corresponding error bars
i am getting the plot where the error bars are connected by a line so i get two lines with error bars (the line from the fit and the line from the error line)
figure
hold on
Fit_1=fit(X,Y,'poly2');
plot(Fit_1,X,Y);
hE_1=errorbar(X, Y, err_1);
i am getting something like this:
untitled.jpg
also any easy way to add the correct legend? as i would like to note only the error bars and the fitted curve with the same color and name it in the legend (in total there are 9 polynoms and the 9 corresponding error bars..)

回答 (0 件)

カテゴリ

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

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by