📄 fastkernel.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Kernel for Reconstruction from Wavelet Ridges</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../R.css">
</head><body>
<table width="100%" summary="page for fastkernel {Rwave}"><tr><td>fastkernel {Rwave}</td><td align="right">R Documentation</td></tr></table>
<h2>Kernel for Reconstruction from Wavelet Ridges</h2>
<h3>Description</h3>
<p>
Computes the cost from the sample of points on the estimated ridge
and the matrix used in the reconstruction of the original signal,
using simple trapezoidal rule for integrals.
</p>
<h3>Usage</h3>
<pre>
fastkernel(node, phinode, nvoice, x.inc=1, x.min=node[1],
x.max=node[length(node)], w0=2 * pi, plot=FALSE)
</pre>
<h3>Arguments</h3>
<table summary="R argblock">
<tr valign="top"><td><code>node</code></td>
<td>
values of the variable b for the nodes of the ridge.
</td></tr>
<tr valign="top"><td><code>phinode</code></td>
<td>
values of the scale variable a for the nodes of the ridge.
</td></tr>
<tr valign="top"><td><code>nvoice</code></td>
<td>
number of scales within 1 octave.
</td></tr>
<tr valign="top"><td><code>x.inc</code></td>
<td>
step unit for the computation of the kernel
</td></tr>
<tr valign="top"><td><code>x.min</code></td>
<td>
minimal value of x for the computation of <i>Q_2</i>.
</td></tr>
<tr valign="top"><td><code>x.max</code></td>
<td>
maximal value of x for the computation of <i>Q_2</i>.
</td></tr>
<tr valign="top"><td><code>w0</code></td>
<td>
central frequency of the wavelet
</td></tr>
<tr valign="top"><td><code>plot</code></td>
<td>
if set to TRUE, displays the modulus of the matrix of <i>Q_2</i>.
</td></tr>
</table>
<h3>Details</h3>
<p>
Uses trapezoidal rule (instead of Romberg's method) to evaluate
the kernel.
</p>
<h3>Value</h3>
<p>
matrix of the <i>Q_2</i> kernel.</p>
<h3>References</h3>
<p>
See discussions in the text of ``Practical Time-Frequency Analysis''.
</p>
<h3>See Also</h3>
<p>
<code><a href="kernel.html">kernel</a></code>, <code><a href="rkernel.html">rkernel</a></code>, <code><a href="gkernel.html">gkernel</a></code>,
<code><a href="zerokernel.html">zerokernel</a></code>.
</p>
<h3>Examples</h3>
<pre>
# The function is currently defined as
function(node, phinode, nvoice, x.inc = 1, x.min = node[1], x.max = node[length(node)], w0 = 2 * pi, plot = F)
{
#########################################################################
# fastkernel:
# -----------
# Same as kernel, except that the kernel is computed
# using Riemann sums instead of Romberg integration.
#
# Input:
# ------
# node: values of the variable b for the nodes of the ridge
# phinode: values of the scale variable a for the nodes of the ridge
# nvoice: number of scales within 1 octave
# x.inc: step unit for the computation of the kernel
# x.min: minimal value of x for the computation of Q2
# x.max: maximal value of x for the computation of Q2
# w0: central frequency of the wavelet
# plot: if set to TRUE, displays the modulus of the matrix of Q2
#
# Output:
# -------
# ker: matrix of the Q2 kernel
#
#########################################################################
lng <- as.integer((x.max - x.min)/x.inc) + 1
nbnode <- length(node)
b.start <- x.min - 50
b.end <- x.max + 50
ker.r <- matrix(0, lng, lng)
ker.i <- matrix(0, lng, lng)
dim(ker.r) <- c(lng * lng, 1)
dim(ker.i) <- c(lng * lng, 1)
phinode <- 2 * 2^(phinode/nvoice)
z <- .C(fastkernel,
ker.r = as.double(ker.r),
ker.i = as.double(ker.i),
as.integer(x.min),
as.integer(x.max),
as.integer(x.inc),
as.integer(lng),
as.double(node),
as.double(phinode),
as.integer(nbnode),
as.double(w0),
as.double(b.start),
as.double(b.end))
ker.r <- z$ker.r
ker.i <- z$ker.i
dim(ker.r) <- c(lng, lng)
dim(ker.i) <- c(lng, lng)
ker <- matrix(0, lng, lng)
i <- sqrt(as.complex(-1))
ker <- ker.r + i * ker.i
if(plot == T) {
par(mfrow = c(1, 1))
image(Mod(ker))
title("Matrix of the reconstructing kernel (modulus)")
}
ker
}</pre>
<hr><div align="center">[Package <em>Rwave</em> version 1.24 <a href="00Index.html">Index]</a></div>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -