MATLAB: Help with quadratic function graph

graphgraphergraphingMATLABplotploting

need help making a quadratic growth graph where the maximum of 22.0 is at center with 0.55 on the ends. The x range is from 1 – 15 so need 0.55 at 1 and 0.55 at 15 with 22 at 8. please help

Best Answer

Try this
x = [1 8 15];
y = [0.55 22 0.55];
ft = fittype('a*x^2+b*x+c');
fit_quad = fit(x',y',ft);
xv = linspace(x(1), x(end), 100);
yv = fit_quad(xv);
plot(xv,yv);
xlim([x(1) x(end)]);
ylim([0.55 22]);