# ShenCastanMatrix

gives a matrix that corresponds to an exponential kernel of radius r.

ShenCastanMatrix[{r,σ}]

gives a matrix corresponding to an exponential kernel with radius r and region of support specified by σ.

ShenCastanMatrix[r,{n1,n2}]

gives a matrix formed from the n1 derivative of the exponential with respect to rows and the n2 derivative with respect to columns.

ShenCastanMatrix[r,{{n11,n12},{n21,n22},}]

gives a matrix formed from the sums of the ni1 and ni2 derivatives.

ShenCastanMatrix[{{r1,r2,},σ},]

gives an array corresponding to an exponential kernel with radius ri in the i index direction.

# Details and Options • ShenCastanMatrix[{r,σ}] gives values proportional to at x index positions from the center, where b is proportional to σ, so that a value of σ=r/2 gives approximately 95% of the total area under the exponential.
• uses .
• By default, the elements of sum to 1.
• ShenCastanMatrix[,{n1,n2}] constructs derivatives as finite differences.
• ShenCastanMatrix[{Automatic,σ,f},] constructs a matrix just large enough to include at least a fraction f of the discrete integral of an exponential in each direction.
• Any of the r, σ, and f can be lists, specifying different values for different directions.
• For integer r, ShenCastanMatrix[r,] yields a × matrix.
• For noninteger r, the value of r is effectively rounded to an integer.
• The following options can be specified:
•  Standardized True whether to rescale and shift the matrix to account for truncation WorkingPrecision Automatic the precision with which to compute matrix elements
• With , the elements of will sum to 1. However, the elements of ShenCastanMatrix[r,{n1,n2,}] with at least one nonzero ni will sum to 0, and the sum of the elements, weighted in each direction by times the distance from the origin to the power of ni, will be 1.

# Examples

open all close all

## Basic Examples(3)

 In:= Out= MatrixPlot of an exponential matrix:

 In:= Out= 1D exponential vector:

 In:= Out= ## Properties & Relations(1)

Introduced in 2012
(9.0)
|
Updated in 2015
(10.1)