myInput = uq_createInput(InputOpts);
MetaOpts.Type = ‘Metamodel’;
MetaOpts.MetaType = ‘PCE’;
MetaOpts.ExpDesign.X = X_sample100;
MetaOpts.ExpDesign.Y = Y_sample100;
MetaOpts.Degree = 1:5;
MetaOpts.ValidationSet.X = Xval;
MetaOpts.ValidationSet.Y = Yval;
myPCE = uq_createModel(MetaOpts);
uq_print(myPCE)
YPCE = uq_evalModel(myPCE,Xval);
uq_figure
cmap = uq_colorOrder(2);
uq_histogram(Yval, ‘FaceColor’, cmap(1,:))
hold on
uq_histogram(YPCE, ‘FaceColor’, cmap(2,:))
hold off
xlabel(’\mathrm{Y}’)
ylabel(‘Counts’)
uq_legend(…
{‘True model response’, ‘PCE prediction’},…
‘Location’, ‘northwest’)
Hi! Above is my code according to the example “PCE from existing data: Truss data set”,but in the histogram the counts are not integers but decimals,besides ‘True model response’ in color blue is not displayed, why?