0

我试图在同一张图上绘制均值、标准差和三次拟合。目前,我使用“errorbar”函数来绘制均值和标准差。我使用 fit 函数对我的数据进行三次拟合。如何在一张图表中显示所有信息?

这是我的代码

拟合数据:

f = fit(x_label',m','cubicinterp');

绘制拟合数据

figure
plot(f,x_label,m);

绘制均值和标准数据

errorbar(x_label,m,exp_std,'r-');
4

1 回答 1

0
f = fit(x_label',m','cubicinterp');  %fit the data
plot(f,'b');                         %plot the fitting curve
hold on                              %hold the current graph
errorbar(x_label',m',exp_std','rx');  %plot the mean and standard deviation
于 2014-02-24T06:36:42.843 回答