2
$\begingroup$

Firstly I'm sorry if this has been asked before, but I couldn't find what I was looking for.

Say I have a function:

f[x, a] := x^2 + a

Is it possible to plot a single graph of all f[x, a] against x with a taking integer values up to some number N and x between -10 and 10?

$\endgroup$
5
$\begingroup$
Plot[Table[x^2 + a, {a, 0, 5}], 
    {x, -10, 10}]
| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you so much. This is exactly what I needed. $\endgroup$ – harpreet bains Dec 7 '15 at 23:23
  • $\begingroup$ Perhaps, then, you could up-vote my answer by clicking the up triangle, or accepting my answer by clicking the check mark. $\endgroup$ – David G. Stork Dec 7 '15 at 23:32
  • $\begingroup$ I have now, I had to wait 8 minutes. I cant up-vote sorry, I dont have enough reputation. $\endgroup$ – harpreet bains Dec 7 '15 at 23:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.