%% 分布图
X = 1:0.25:10;
Y = sin(X)+0.25*X;
Y_error = randn(1000,numel(Y));
Y_noisy = Y+Y_error.*repmat(0.1*X,[size(Y_error,1) 1]);
figure('Color','w');
subplot(3,1,1);
plot(X,Y,'LineWidth',1.5);
title('plot (True value y=f(x))');
ylim([-1 5]);
subplot(3,1,2);
hold on
plot(X,Y,'LineWidth',1.5);
plot_distribution(X,Y_noisy);
hold off
title('plot\_distribution');
ylim([-1 5]);
subplot(3,1,3);
hold on
plot(X,Y,'LineWidth',1.5);
%参数LineWidth为线宽
plot_distribution_prctile(X,Y_noisy,'Prctile',[25 50 75 90]);
%参数Prctile为要绘制的百分位值
hold off
title('plot\_distribution\_prctile');
ylim([-1 5]);