What my title said and I want to plot the values of the array. still new to mathematica and programming so its hard to formulate my question just right

  • $\begingroup$ Please show us what you have tried so far. You should be able to piece something together with the help of the documentation. $\endgroup$
    – C. E.
    Commented Sep 23, 2014 at 22:04
  • $\begingroup$ For[] and loops in general are usually a bad idea in Mathematica. See for example: mathematica.stackexchange.com/a/18396/193 $\endgroup$ Commented Sep 23, 2014 at 22:15
  • $\begingroup$ This question has been asked many times before. I picked one and closed this question ad a duplicate of it. (See the link in the header added to your question.) See also: (4496) and (9455). Finally, please read this for some examples of how you can improve your approach: (7924) $\endgroup$
    – Mr.Wizard
    Commented Sep 23, 2014 at 23:49

1 Answer 1


This is how you should NOT do it in Mathematica:

list = {};
f[x_] := x^4
For[i = 1, i < 100, i++, AppendTo[list, f[i]]];

And this is one of the many possible better ways:

ListLinePlot@ f @ Range@100

Mathematica graphics


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