[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] interpolation and integration
From: |
Yun Li |
Subject: |
[Help-gsl] interpolation and integration |
Date: |
Thu, 2 Mar 2006 12:01:08 -0500 |
Hi, all,
I need to perform the task: I have n points {(x(i),y(i)}. First I want to do
cubic spline f(x). Then at each point, I do an integration, the integrand
should be f(x)*pdf(z), where z is the normal random variable, and x is a
function of z (say x=a+b*z).
Could some one let me know how should I do?
I found the following functions:
Function (1) gsl_spline * gsl_spline_alloc (const gsl_interp_type * T,
size_t
size)
Function (2): double gsl_spline_eval_integ (const gsl_spline * spline,
double
a, double b, gsl_interp_accel * acc)
It seems that I can create a gsl_spline f(x) by the function (1) and do the
integration by function (2).
However, in my problem, I want to integrate f(x)*pdf(z). Could I still use
function (1) to do the job, how can I put the pdf(z)
into the integrand?
Thanks a lot,
Best regards,
Yun
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Help-gsl] interpolation and integration,
Yun Li <=