first.last(wavethresh)
first.last()所属R语言包:wavethresh
Build a first/last database for wavelet transforms.
建立一个小波变换的第一个/最后一个数据库。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function is not intended for user use, but is used by various functions involved in computing and displaying wavelet transforms. It basically constructs "bookeeping" vectors that WaveThresh uses for working out where coefficient vectors begin and end.
此功能供用户使用,但用于计算和显示小波变换的各种功能。它基本上是构建“bookeeping”的向量,WaveThresh用于工作的系数向量的开始和结束。
用法----------Usage----------
first.last(LengthH, DataLength, type, bc="periodic", current.scale=0)
参数----------Arguments----------
参数:LengthH
Length of the filter used to produce a wavelet decomposition.
长度的过滤器,用于产生一个小波分解。
参数:DataLength
Length of the data before transforming. This must be a power of 2, say 2^m.
改造前的数据的长度。这必须是2的幂,说2^m。
参数:type
The type of wavelet transform. Can be "wavelet" or "periodic"
小波变换的类型。可以“小波”或“定期”
参数:bc
This character string argument determines how the boundaries of the the function are to be handled. The permitted values are periodic or symmetric.
此字符串参数确定的界限的功能是如何处理的。允许的值是periodic或symmetric。
参数:current.scale
Can handle a different initial scale, but usually left at the default
可以处理不同的初始规模,但通常保留为默认
Details
详细信息----------Details----------
Suppose you begin with 2^m=2048 coefficients. At the next level you would expect 1024 smoothed data coefficients, and 1024 wavelet coefficients, and if bc="periodic" this is indeed what happens. However, if bc="symmetric" you actually need more than 1024 (as the wavelets extend over the edges). The first last database keeps track of where all these "extras" appear and also where they are located in the packed vectors C and D of pyramidal coefficients within wavelet structures.
假设你开始与2^m=2048系数。在一个新的水平,你所期望的1024平滑的数据系数,1024小波系数,如果bc="periodic"这确实是发生了什么。但是,如果bc="symmetric"你的实际需要超过1024个(如小波扩展到边缘)。倒数第一的数据库跟踪,所有这些“额外”的出现,它们的位置在拥挤的向量C和D的金字塔系数在小波结构。
For examples, given a first.last.c row of
举例来说,一个first.last.c row
The actual coefficients would be
实际的系数将
In other words, there are 6 coefficients, starting at -2 and ending at 3, and the first of these (c_{-2}) appears at an offset of 20 from the beginning of the $C component vector of the wavelet structure.
换句话说,有6个系数,在-2开始和结束位置为3,并且第一,这些(c_{-2})出现在从一开始的$C分量矢量的偏移量20的小波结构。
You can “do” first.last in your head for periodic boundary handling but for more general boundary treatments (e.g. symmetric) first.last is indispensable.
您可以在“做”first.last在你的头periodic边界处理,但对于更一般的边界处理(如:symmetric)first.last是不可缺少的。
值----------Value----------
A first/last database structure, a list containing the following information:
第一个/最后的数据库结构,一个列表,其中包含以下信息:
<table summary="R valueblock"> <tr valign="top"><td>first.last.c</td> <td> A (m+1)x3 matrix. The first column specifies the real index of the first coefficient of the smoothed data at a level, the 2nd column is the real index of the last coefficient, the last column specifies the offset of the first smoothed datum at that level. The offset is used by the C code to work out where the beginning of the sequence is within a packed vector of the pyramid structure. The first and 2nd columns can be used to work out how many numbers there are at a level. If bc="periodic" then the pyramid is a true power of 2 pyramid, that is it starts with a power of 2, and the next level is half of the previous. If bc="symmetric" then the pyramid is nearly exactly a power of 2, but not quite, see the Details section for why this is so. </td></tr> <tr valign="top"><td>ntotal</td> <td> The total number of smoothed data/original data points.</td></tr> <tr valign="top"><td>first.last.d</td> <td> A mx3 matrix. As for first.last.c but for the wavelet coefficients packed as the D component of a wavelet structure.</td></tr> <tr valign="top"><td>ntotal.d</td> <td> The total number of wavelet coefficients.</td></tr> </table>
<table summary="R valueblock"> <tr valign="top"> <TD> first.last.c</ TD> <TD> A(M +1)×3矩阵。第一列指定的第一系数的平滑化数据的水平的真正的索引,第2列是真实的指数的最后系数,指定的偏移量,在该水平的第一被平滑的数据的最后一列。偏移量所使用的C代码的工作,满分该从哪里开始的序列内的金字塔结构的填充矢量。可用于工作的第一列和第二列有多少个数字的水平。如果bc="periodic"然后金字塔是一个真正的权力的金字塔,是2的幂,开始一个新的水平是以前的一半。如果bc="symmetric"然后在金字塔几乎完全是2的幂,但不大,为什么会是这样,请参阅详细信息部分。 </ TD> </ TR> <tr valign="top"> <TD> ntotal</ TD> <TD>平滑后的数据/原始数据点的总数。</ TD> </ TR> <tr valign="top"> <TD> first.last.d </ TD> <td>一个MX3矩阵。至于first.last.c,但对于包装的D分量的小波结构的小波系数。</ TD> </ TR> <tr valign="top"> <TD> ntotal.d</ TD> <TD>小波系数的总数。</ TD> </ TR> </ TABLE>
RELEASE----------RELEASE----------
Version 3.5.3 Copyright Guy Nason 1994
版本3.5.3版权盖利晨1994年
(作者)----------Author(s)----------
G P Nason
参考文献----------References----------
<h3>See Also</h3> <code>wd</code>, <code>wr</code>, <code>wr.wd</code>, <code>accessC</code>, <code>accessD</code>, <code>filter.select</code>. <code>imwd</code>.
实例----------Examples----------
#[]
#If you're twisted then you may just want to look at one of these.[如果你扭曲,那么你可能只是想看看在其中的一个。]
#[]
first.last(length(filter.select(2)), 64)
#$first.last.c:[$ first.last.c:]
#First Last Offset[尾页偏移]
#[1,] 0 0 126[[1,] 0 0 126]
#[2,] 0 1 124[[2] 0 1 124]
#[3,] 0 3 120[[3] 0 3 120]
#[4,] 0 7 112[[4] 0 7 112]
#[5,] 0 15 96[[5] 0 15 96]
#[6,] 0 31 64[[6] 0 31 64]
#[7,] 0 63 0[[7] 0 63 0]
#[]
#$ntotal:[$ n总计:]
#[1] 127[[1] 127]
#[]
#$first.last.d:[$ first.last.d:]
#First Last Offset[尾页偏移]
#[1,] 0 0 62[[1] 0 0 62]
#[2,] 0 1 60[[2] 0 1 60]
#[3,] 0 3 56[[3] 0 3 56]
#[4,] 0 7 48[[4] 0 7 48]
#[5,] 0 15 32[[5] 0 15 32]
#[6,] 0 31 0[[6] 0 31 0]
#[]
#$ntotal.d:[$ ntotal.d:]
#[1] 63[[1] 63]
#[]
#[]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|