Ask any question about EPFL courses, lectures, exercises, research, news, etc. or try the example questions below.
DISCLAIMER: The Graph Chatbot is not programmed to provide explicit or categorical answers to your questions. Rather, it transforms your questions into API requests that are distributed across the various IT services officially administered by EPFL. Its purpose is solely to collect and recommend relevant references to content that you can explore to help you answer your questions.
In numerical integration, Simpson's rules are several approximations for definite integrals, named after Thomas Simpson (1710–1761). The most basic of these rules, called Simpson's 1/3 rule, or just Simpson's rule, reads In German and some other languages, it is named after Johannes Kepler, who derived it in 1615 after seeing it used for wine barrels (barrel rule, Keplersche Fassregel). The approximate equality in the rule becomes exact if f is a polynomial up to and including 3rd degree. If the 1/3 rule is applied to n equal subdivisions of the integration range [a, b], one obtains the composite Simpson's 1/3 rule. Points inside the integration range are given alternating weights 4/3 and 2/3. Simpson's 3/8 rule, also called Simpson's second rule, requires one more function evaluation inside the integration range and gives lower error bounds, but does not improve on order of the error. If the 3/8 rule is applied to n equal subdivisions of the integration range [a, b], one obtains the composite Simpson's 3/8 rule. Simpson's 1/3 and 3/8 rules are two special cases of closed Newton–Cotes formulas. In naval architecture and ship stability estimation, there also exists Simpson's third rule, which has no special importance in general numerical analysis, see Simpson's rules (ship stability). Simpson's 1/3 rule, also simply called Simpson's rule, is a method for numerical integration proposed by Thomas Simpson. It is based upon a quadratic interpolation. Simpson's 1/3 rule is as follows: where is the step size. The error in approximating an integral by Simpson's rule for is where (the Greek letter xi) is some number between and . The error is asymptotically proportional to . However, the above derivations suggest an error proportional to . Simpson's rule gains an extra order because the points at which the integrand is evaluated are distributed symmetrically in the interval . Since the error term is proportional to the fourth derivative of at , this shows that Simpson's rule provides exact results for any polynomial of degree three or less, since the fourth derivative of such a polynomial is zero at all points.
[2]Paolo Prandoni, [3]LCAV, EPFL
In this notebook we will implement a simple fractional resampler that
uses local Lagrange interpolation. The resampler can be used to perform
any rational sampling rate change (but beware of aliasing when
downsampling!)
In [1]:
import numpy as np
import IPython
from scipy.io import wavfile
Local Lagrange interpolation[4]¶
To perform resampling we will need to compute subsample values and, in [2]Paolo Prandoni, [3]LCAV, EPFL
The Parks-McClellan (PM) algorithm is a clever application of advanced
polynomial fitting techniques to the problem of FIR filter design. In
this notebook we will explore the key ideas behind the method by
considering the design of a simple Type-I lowpass filter.
NOTE: This notebook uses interactive widgets. If the interactive
controls do not work or show up, please fo