Learn R Programming

dualtrees (version 0.1.5)

boundaries: Various boundary conditions for the 2D wavelet transform.

Description

Extend a matrix to the desired size.

Usage

pad(x, N, Ny = N, value = min(x, na.rm = TRUE))

put_in_mirror(x, N, Ny = N)

period_bc(x, N, Ny = N)

Value

a list containing the extended matrix ($res) and the positions of the original matrix within the extended one ($px and $py).

Arguments

x

a real matrix

N

the number of rows of the desired output

Ny

the number of columns of the desired output, defaults to N

value

the value with which the picture is padded by pad

Details

pad pads the fields with a constant value on all sides, be careful what you pick here. put_in_mirror reflects the input at all edges (with repeated end samples), period_bc simply repeats the input periodically. In any case, you can retrieve the initial area via bc$res[ bc$px, bc$py ].

Examples

Run this code
bc <- put_in_mirror( blossom, N=300 )
plot( bc )
print( range( bc$res[ bc$px, bc$py ] - blossom ) )

Run the code above in your browser using DataLab