projects
/
htsworkflow.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Added script front-end for primer-design code
[htsworkflow.git]
/
htswanalysis
/
MACS
/
lib
/
gsl
/
gsl-1.11
/
doc
/
examples
/
fitting3.c
1
#include <stdio.h>
2
#include <math.h>
3
#include <gsl/gsl_randist.h>
4
5
int
6
main (void)
7
{
8
double x;
9
const gsl_rng_type * T;
10
gsl_rng * r;
11
12
gsl_rng_env_setup ();
13
14
T = gsl_rng_default;
15
r = gsl_rng_alloc (T);
16
17
for (x = 0.1; x < 2; x+= 0.1)
18
{
19
double y0 = exp (x);
20
double sigma = 0.1 * y0;
21
double dy = gsl_ran_gaussian (r, sigma);
22
23
printf ("%g %g %g\n", x, y0 + dy, sigma);
24
}
25
26
gsl_rng_free(r);
27
28
return 0;
29
}