Home > wafo > misc > qrule2d.m

# qrule2d

## PURPOSE

compute abscissas and weight factors for Gaussian quadratures

## SYNOPSIS

[bpx,bpy,wfxy] = qrule2d (nx,ny)

## DESCRIPTION

``` QRULE2D compute abscissas and weight factors for Gaussian quadratures

CALL:  [bpx,bpy,wfxy]=qrule2d(nx,ny)

bpx, bpy = base points (abscissas)
wfxy     = weight factors
nx,ny    = number of base points (abscissas) in each direction.

## CROSS-REFERENCE INFORMATION

This function calls:
 qrule compute abscissas and weight factors for Gaussian quadratures meshgrid X and Y arrays for 3-D plots.
This function is called by:
 gaussq2d Numerically evaluates a 2D integral using Gauss quadrature.

## SOURCE CODE

```01 function [bpx,bpy,wfxy] = qrule2d (nx,ny)
02 %QRULE2D compute abscissas and weight factors for Gaussian quadratures
03 %
04 % CALL:  [bpx,bpy,wfxy]=qrule2d(nx,ny)
05 %
06 %  bpx, bpy = base points (abscissas)
07 %  wfxy     = weight factors
08 %  nx,ny    = number of base points (abscissas) in each direction.
09 %
11
12
13 [bpxv,wfxv]=qrule(nx);
14 [bpyv,wfyv]=qrule(ny);
15 [bpx,bpy]=meshgrid(bpxv,bpyv);
16 [wfx,wfy]=meshgrid(wfxv,wfyv);
17 wfxy=wfx.*wfy;
18```

Mathematical Statistics
Centre for Mathematical Sciences
Lund University with Lund Institute of Technology

Comments or corrections to the WAFO group

Generated on Thu 06-Oct-2005 02:21:16 for WAFO by m2html © 2003