Computations for growth models - PowerPoint PPT Presentation

About This Presentation
Title:

Computations for growth models

Description:

Computations for growth models. Plotting exponential growth/decline curve. Matlab commands: ... Chinese children growth charts: http://www.fwcc.org/growthchart.html ... – PowerPoint PPT presentation

Number of Views:28
Avg rating:3.0/5.0
Slides: 14
Provided by: pola4
Category:

less

Transcript and Presenter's Notes

Title: Computations for growth models


1
Computations for growth models
2
Plotting exponential growth/decline curve
  • Matlab commands
  • clear all
  • figures for exponential growth/decline
  • tim00.120
  • r0.1
  • N_0100
  • NN_0exp(rtim)
  • plot(tim,N,'k')

3
Using Matlab function ode45 for computing
solution to logistic equation
  • Matlab commands
  • clear all
  • environmental capacity
  • K500
  • Initial population size
  • N01
  • growth rate
  • r0.1
  • time scale
  • tim00.1100

4
  • analytic solution to logistic differential
    equaiton
  • for ki1length(tim)
  • N(ki)K/(1(K/N0-1)exp(-rtim(ki)))
  • end
  • Now we compute the same using ode45
  • and the function 'lgf' which defines logistic
    model
  • Tode,Nodeode45('lgf',0 100,1)
  • compare two curves
  • plot(tim,N,Tode,Node,'or')

5
  • Matlab function lgf used in the above procedure
    ode45
  • function lgf
  • function dNlgf(T,N)
  • r0.1
  • K500
  • dNrN(1-N/K)

6
Simulink block diagram for logistic model with
delay in environmental limiting action
7
1
s
Integrator
Scope
0.5
Gain
Product
simout
To Workspace
-K-
Transport
Gain1
Delay
1
Constant
8
Fitting model parameters to data
  • Method of least squares, find (estimate) X

Size(B) n x 1, Size(A) n x k, Size(X) k x
1, n gt k
T matrix transposition
Matlab function to compute X XA\B
9
Data on world population
  • http//www.census.gov/ipc/www/world.html

10
Fitting exponential model to data on world
population - 1
  • Data written in Matlab format
  • clear all
  • popdt-10000 1 -8000 5 -6500
    5 -5000 5
  • -4000 7 -3000 14 -2000
    27 -1000 50
  • -500 100 -400 162 -200
    150 1 170
  • 200 190 400 190 500
    190 600 200
  • 700 207 800 220 900
    226 1000 254
  • 1100 301 1200 360 1250
    400 1300 360
  • 1340 443 1400 350 1500
    425 1600 545
  • 1650 470 1700 600 1750
    629 1800 813
  • 1850 1128 1900 1550 1910
    1750 1920 1860
  • 1930 2070 1940 2300 1950
    2400
  • timpopdt(,1)
  • populpopdt(,2)

11
  • Atim ones(size(tim))
  • Blog(popul)
  • our estimated parameters
  • PARA\B
  • now let us see how our estimates compare to
    data
  • for kk1length(B)
  • ppl(kk)PAR(1)tim(kk)PAR(2)
  • end
  • plot(tim,ppl,tim,log(popul),'or')
  • pause
  • or
  • plot(tim,exp(ppl),tim,popul,'or')

12
Fitting exponential model to data on world
population - 2
  • Use of Matlab function fmins to minimize over
    arguments
  • Matlab commands
  • find parameters estimates
  • QPARfmins('wp_fun',0.0006 5)
  • now let us see how our estimates compare to
    data
  • for kk1length(tim)
  • qppl(kk)exp(QPAR(1)tim(kk)QPAR(2))
  • end
  • plot(tim,log(qppl),tim,log(popul),'or')
  • pause
  • or
  • plot(tim,qppl,tim,popul,'or')

13
More data
  • USA population 1790 2000
  • http//fisher.lib.virginia.edu/census/
  • Chinese children growth charts
  • http//www.fwcc.org/growthchart.html
Write a Comment
User Comments (0)
About PowerShow.com