0
$\begingroup$

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

$\endgroup$
3
  • $\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.
    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$ 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
    Sep 23, 2014 at 23:49

1 Answer 1

4
$\begingroup$

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]]];
ListLinePlot@list

And this is one of the many possible better ways:

ListLinePlot@ f @ Range@100

Mathematica graphics

$\endgroup$

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