Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.6K Views
|
4 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Use NestList, ListLinePlot and matrices for a population growth model?

Posted 6 years ago

Hi, I'm trying to work on a population growth model, but don't know what is wrong with this simple code. Can I use ListLinePlot on matrices' entires and plot the curves? The NestList works fin, but ListLinePlot does not plot it. Can you guys help me here with this simple question?

ListLinePlot[NestList[#^2 &, ( {{0.95},{1.1}} ), 4]]

Thank you.

Andre

POSTED BY: andreusp6
4 Replies
Posted 6 years ago
POSTED BY: andreusp6
Posted 6 years ago

Sorry, misunderstood what you were asking. Is this correct?

data = NestList[#^2 &, ({{0.95}, {1.1}}), 4]
Flatten@data[[All, #]] & /@ {1, 2} // ListLinePlot

enter image description here

POSTED BY: Rohit Namjoshi
Posted 6 years ago

Hey, Thank you but I'm looking for plotting the behavior of two independent populations with initial states 0.95 and 1.1 that follow a simple power law (^2). So, the graph would be of two independent plots, one growing to infinity and another going to 0. You are flattening the two progressions into one. I also noticed that the population values should be along the y axis and the steps along the x axis. Andre

POSTED BY: andreusp6
Posted 6 years ago
POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard