[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: complex integral or multiple integral
From: |
Dirk Laurie |
Subject: |
Re: complex integral or multiple integral |
Date: |
Fri, 3 Mar 2000 11:55:51 +0200 (SAST) |
Shih Lin skryf:
>
> In your help-octave mailing list 5 May, 1998, you talk about compexx
> integral in octave,
>
> I am interesting inverse fourier transform, with v(f)*exp(i*2*pi*f)
> but before go that far, I tried at octave 2.0.13
> [...]
If v is known to be smooth and periodic of period 1, then you calculate
all the integrals of the form
V(k+1) = integral[x=0 to 1] v(x)*exp(2i*pi*k*x) dx
at once by
V = ifft(vx)
where vx is v(x) for x=(0:n-1)/n, for some convenient n.
This is a more accurate way of calculating those integrals than
any other n-point formula, when k is small in relation to n and
(worth saying again) v is smooth. It is easy to forget that the
smoothness must also be true at the boundaries, i.e. considering
v(x) in the interval (-h,h), using the property v(-x)=v(1-x) to
define v for negative x, there should not be jumps in low-order
derivatives at x=0.
This is so much easier than any other method in Octave that I would
rather use the phrase "go that far" to describe the attempt to
invoke "quad".
Dirk Laurie
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------