diff options
author | Alberto Ruiz <aruiz@um.es> | 2014-05-21 10:30:55 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2014-05-21 10:30:55 +0200 |
commit | 197e88c3b56d28840217010a2871c6ea3a4dd1a4 (patch) | |
tree | 825be9d6c9d87d23f7e5497c0133d11d52c63535 /packages/hmatrix/examples/plot.hs | |
parent | e07c3dee7235496b71a89233106d93f6cc94ada1 (diff) |
update dependencies, move examples etc
Diffstat (limited to 'packages/hmatrix/examples/plot.hs')
-rw-r--r-- | packages/hmatrix/examples/plot.hs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/packages/hmatrix/examples/plot.hs b/packages/hmatrix/examples/plot.hs deleted file mode 100644 index f950aa5..0000000 --- a/packages/hmatrix/examples/plot.hs +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | import Numeric.LinearAlgebra | ||
2 | import Graphics.Plot | ||
3 | import Numeric.GSL.Special(erf_Z, erf) | ||
4 | |||
5 | sombrero n = f x y where | ||
6 | (x,y) = meshdom range range | ||
7 | range = linspace n (-2,2) | ||
8 | f x y = exp (-r2) * cos (2*r2) where | ||
9 | r2 = x*x+y*y | ||
10 | |||
11 | f x = sin x + 0.5 * sin (5*x) | ||
12 | |||
13 | gaussianPDF = erf_Z | ||
14 | cumdist x = 0.5 * (1+ erf (x/sqrt 2)) | ||
15 | |||
16 | main = do | ||
17 | let x = linspace 1000 (-4,4) | ||
18 | mplot [f x] | ||
19 | mplot [x, mapVector cumdist x, mapVector gaussianPDF x] | ||
20 | mesh (sombrero 40) \ No newline at end of file | ||