"Jac " <jac_domney@hotmail.com> wrote in message <k43df8$bt7$1@newscl01ah.mathworks.com>...
> Hey all,
> I am faced with this task:
> Extract the world population growth rate date from “Population Growth Rate.csv”.
> Given that the initial population at year 1950 is 2532229237. Integrate the world
> population growth rate from 19502010 at 1 year interval to obtain the world’s
> population. You should apply cumulative integration using trapezoidal rule.
>
> The growth rate numerical data are all percentages, and range from 0 to 2.
> After fiddling around i get a row vector with 61 columns.
>
> If I call my row vector A
> and then go:
> B = trapz(A)
>
> I get an answer of approx 99.9.
>
> What does this answer signify and how do i apply it to find the population for 2010?
>
> Any help to greater my understanding would be muchly appreciated. Thanks!
Wikipedia is a good place to start to learn more about the trapezoidal rule. Also, the function you call, TRAPZ, is pretty short and seems easy enough to read. Type "edit trapz" into the command line and check it out!
I have not looked at the function, but I assume it uses a composite trapezoid rule for the points you feed it (given by the row vector). So for some points, you have the solution of the integral (area under the curve ~ 99.9).
For the next question, we have integral(f(x), dx, 1950, 2010) = F(2010)  F(1950), where F'(x) = f(x) (see: Fundamental Theorem of Calculus). Then you have the solution of the integral as well as F(1950), that is, the population in 1950, so there ya go.
