Web-Books
im Austria-Forum
Austria-Forum
Web-Books
Informatik
Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition
Seite - 238 -
  • Benutzer
  • Version
    • Vollversion
    • Textversion
  • Sprache
    • Deutsch
    • English - Englisch

Seite - 238 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition

Bild der Seite - 238 -

Bild der Seite - 238 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition

Text der Seite - 238 -

238 8 SolvingOrdinaryDifferentialEquations Fig. 8.15 The effect ofvaccination:p=0.0005 Fig. 8.16 The effect ofvaccination:p=0.0001 is usually quite a challenge in mathematics, but as long as we solve the equations numerically ina program,adiscontinuouscoefficient is easy to treat. There are two ways to implement the discontinuous coefficientp(t): through a functionand throughanarray.The functionapproachisperhaps theeasiest: def p(t): return 0.005 if (6*24 <= t <= 15*24) else 0 Note the handyif-else construction in the return statement here. It is a one-line alternative to, forexample, if (6*24 <= t <= 15*24): return 0.005
zurück zum  Buch Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition"
Programming for Computations – Python A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition
Titel
Programming for Computations – Python
Untertitel
A Gentle Introduction to Numerical Simulations with Python 3.6
Band
Second Edition
Autoren
Svein Linge
Hans Petter Langtangen
Verlag
Springer Open
Datum
2020
Sprache
englisch
Lizenz
CC BY 4.0
ISBN
978-3-319-32428-9
Abmessungen
17.8 x 25.4 cm
Seiten
356
Schlagwörter
Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
Kategorie
Informatik
Web-Books
Bibliothek
Datenschutz
Impressum
Austria-Forum
Austria-Forum
Web-Books
Programming for Computations – Python