It was suggested to me to use matlab for a term project for my ODE class, I'd like to take a look at several bio models, mostly population growth. The problem is that I have no idea how matlab works.
For instance, I'd like to plot the first X terms of the solutions to an equation, such as $x_{n+1}=rx_n(1-x_n)$, $x_0=0.1$, where $r = 0.9, 1.5, 3, 4$ and then draw cobweb maps of each case.
Any pointers on how to code this or if there are any quick and easy sources on how to figure out how to do this, it would be greatly appreciated. I took one look at the program and couldn't figure anything out, and it being so early in the semester, I haven't had any experience with this program, I'm not sure if we'll even be using it, but I wanted to get a head start in figuring out the program.
Best Answer
This is the code to generate your $x_n$ estimates in a matrix x, the $n^{th}$ row corresponds to the value of $x_{n-1}$ for a different value of $r$, specified by the column index of $x$. I just plotted a normal plot so you can see the evolution.
You should be able to see this
For a cobweb plot, you need to generate a subplot for each $r$, i.e.
Now, you should see this:
This shows you that for all gives $r$ values, you're going to $x_n \rightarrow 0$