Solving a Mathematica Function of 2 Variables w/ Nestlist

  • Context: Mathematica 
  • Thread starter Thread starter peter.a
  • Start date Start date
  • Tags Tags
    Mathematica
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
4 replies · 2K views
peter.a
Messages
19
Reaction score
0
I have a function of two variables

f[x_][y_]=x^2+y;

d=Take[NestList[f[-2],0,10],-2];

now i want to repeat this process by changing -2 to -1.99, then -1.98 all the way up to 0
and storing values in a table, so i can later make a plot. I can't figure out how to repeat this process.
 
Physics news on Phys.org
Thts amazing! I am a bit intimidated by the fact you did in 2 seconds what i have been working on for the better part of an hour.
Thanks.
can you tell me how i can plot this stored data using ListPlot ? to see what the relationship is between x and the y values
 
Whoops hit post 2 times!
 
Is "ListPlot[data]" not what you're looking for?

And don't be intimidated, if you start using Mathematica a lot, Tables are a MAJOR component to using it well.