diff options
author | Alberto Ruiz <aruiz@um.es> | 2014-04-30 16:10:20 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2014-04-30 16:10:20 +0200 |
commit | cf1379fed234cf99b2ccce6d9311bfc5c58ef4a3 (patch) | |
tree | 2532837500eb98af048404e33018fa88d8a7f535 /lib/Numeric/GSL/ODE.hs | |
parent | b8b7b47450a1007d4d8c77bb7d04e2744c3bfcd4 (diff) |
improved documentation
Diffstat (limited to 'lib/Numeric/GSL/ODE.hs')
-rw-r--r-- | lib/Numeric/GSL/ODE.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Numeric/GSL/ODE.hs b/lib/Numeric/GSL/ODE.hs index ab037bd..9a29085 100644 --- a/lib/Numeric/GSL/ODE.hs +++ b/lib/Numeric/GSL/ODE.hs | |||
@@ -13,9 +13,10 @@ Solution of ordinary differential equation (ODE) initial value problems. | |||
13 | 13 | ||
14 | A simple example: | 14 | A simple example: |
15 | 15 | ||
16 | @import Numeric.GSL | 16 | @ |
17 | import Numeric.GSL.ODE | ||
17 | import Numeric.LinearAlgebra | 18 | import Numeric.LinearAlgebra |
18 | import Graphics.Plot | 19 | import Numeric.LinearAlgebra.Util(mplot) |
19 | 20 | ||
20 | xdot t [x,v] = [v, -0.95*x - 0.1*v] | 21 | xdot t [x,v] = [v, -0.95*x - 0.1*v] |
21 | 22 | ||
@@ -23,7 +24,8 @@ ts = linspace 100 (0,20 :: Double) | |||
23 | 24 | ||
24 | sol = odeSolve xdot [10,0] ts | 25 | sol = odeSolve xdot [10,0] ts |
25 | 26 | ||
26 | main = mplot (ts : toColumns sol)@ | 27 | main = mplot (ts : toColumns sol) |
28 | @ | ||
27 | 29 | ||
28 | -} | 30 | -} |
29 | ----------------------------------------------------------------------------- | 31 | ----------------------------------------------------------------------------- |