Matlab Database > Numerical Quadrature > ROMBERG_HP

Matlab File(s)

Author: Rolf Krause
Institution: University of Bonn
Description: Compute the value of int a to b f(x) dx using an (hp)-adaptive romberg quadrature scheme. The usage is

val = romberg_hp(f_name,a,b,TOL,GRAPH)

val = value of the integral, a from, b to, TOL given tolerance. The default value for TOL is 1e-3, if TOL is omitted.

If GRAPH is nonzero, the old nodes (red), new nodes (green), corresponding values of f, the estimated local error (blue) and the order used in the extrapolation tableau will be plotted for every refinement step (nice movie).
Default is GRAPH = 0.

intval = romberg_hp('sin',0,pi);
intval = romberg_hp('sin',0,pi,1e-6);
intval = romberg_hp('sqrt',0,1,[],1);

nadelimpus.m: Test function for adaptive quadrature schemes.

This m-file implements the function y = 1./(1e-4 + x.*x) given in Deuflhard/Hohmann, "Numerische Mathematik I"

Example: Compare the number of f-evaluations of
valR = romberg_hp('nadelimpuls',-1,1,1e-5,0) and
[valQ, fEvalCount] = quad('nadelimpuls',-1,1,1e-5)
Keywords: ---
File Name:
File Size: 4 KB
File Version: 1.0
Matlab Version: 6.1
Date: 1998-02-22
Downloads: 1723
Download File

Upload your own files today! Click here for more information.