Manipulate Command and Plot [closed]

xstep = (xhi - xlo)/100
x = Table [xlo + (i - 1)*xstep, {i, 1, 101}];
a0 = 9
a1 = 4
a2 = 1
a3 = 0
Ca0 = Table[5 + (i - 1), {i, 1, 101}];
Da1 = Table[a1*x];
Ea2 = Table[a2*(x^2)];
y = Da1 + Ea2 + a0;
data = Transpose@{x, y};
ListPlot[{data}]

I have the following code and wants to combine this with Manipulate command so that when I change the a0, a1, a2,a3, the output of graph changes. like in the following command

Manipulate[
Plot[a* x^2 + b *x + c, {x, -100, 100}], {a, -1, 1, 0.2}, {b, -10,
10, 1}, {c, -50, +50, 5}]

closed as off-topic by Feyre, MarcoB, Sascha, happy fish, ÖskåFeb 21 '17 at 10:53

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – happy fish, Öskå
If this question can be reworded to fit the rules in the help center, please edit the question.

• You have defined Da1 and Ea2 erroneously, what are you trying to do there? – Feyre Feb 19 '17 at 10:38
• Creating a series, first one equal to a1*x and Second one (a2*x^2). after that, I have to create a series y, which is equal to y = Da1 + Ea2 + a0. – GIS learner Feb 19 '17 at 10:58
• I'm voting to close this question as off-topic because it is too localised and only relies on basic Mathematica programming skills, and is therefore unlikely to help others. – Feyre Feb 19 '17 at 11:59

Create a function data with arguments a0, a1, a2, xhi, and xlo.

xstep = (xhi - xlo)/100;
x = Table[xlo + (i - 1)*xstep, {i, 1, 101}];
Ca0 = Table[5 + (i - 1), {i, 1, 101}];
Da1 = a1*x;
Ea2 = a2*(x^2);
y = Da1 + Ea2 + a0;
data[a0_, a1_, a2_, xhi_, xlo_] = Transpose@{x, y};

Then, use Manipulate,

Manipulate[
ListPlot[data[a0, a1, a2, xhi, xlo], Frame -> True], {{xhi, 9}, 1, 9,
1}, {{xlo, 2}, 1, 5, 1}, {{a0, 9}, 1, 10, 1}, {{a1, 4}, 1, 10,
1}, {{a2, 1}, 1, 10, 1}, ControlType -> LabeledSlider] • why the graph output is not changing, when I am changing parameters value – GIS learner Feb 19 '17 at 11:50
• @MuhammadRamzan Try restarting your kernel. – Feyre Feb 19 '17 at 11:58
• how i can do that please – GIS learner Feb 19 '17 at 12:00
• @MuhammadRamzan Run Quit[]. – Anjan Kumar Feb 19 '17 at 12:03
• @ Anjan Kumar last thing how i can change my x-axis range let say from -500 to 500 – GIS learner Feb 19 '17 at 12:09