## Example 3.1 Gabor Functions
## Generate a Gabor function at given frequency (here 0.1 Hz), for a
## sampling frequency (here 1 Hz), location (here 256) and scale
## (here 25):
gab <- gabor(512, 256, .1, 25)
par(mfrow=c(1,2))
plot(Re(gab), type="l", ylab="")
title("Real part")
plot(Im(gab), type="l", ylab="")
title("Imaginary part")
## Example 3.2 Transients
## Compute Gabor transform of transient signal, here with n_f = 50,
## delta_f = 0.02 and two different values for the scale parameter,
## namely scale = 10, 18:
par(mfrow=c(4,1))
data(A0)
plot(A0, type="l", xaxs="i")
title("Transients")
cgtA0 <- cgt(A0, 50, .02, 10)
cgtA0 <- cgt(A0, 50, .02, 18)
## To display the phase of the Gabor transform
tmp <- cleanph(cgtA0, .1)
title("Phase of the Gabor transform")
## Example 3.3 Sine wave
## Generate the sequence, here a sine wave of frequency 1/32 Hz sampled
## with unit sampling frequency
x <- 1:512
sinewave <- sin(2*pi*x/32)
par(mfrow=c(3,1))
plot(sinewave, type="l")
title("Sine wave")
## Compute the Gabor transform with n_f = 50, delta_f = .005 and scale
## sigma = 25. This corresponds to frequencies ranging from 0 to 0.125
## Hz. Display the phase:
cgtsinewave <- cgt(sinewave, 50, .005, 25)
tmp <- cleanph(cgtsinewave, .01)
title("Gabor Transform Phase")
## Example 3.4 Chirp
## Generate the chirp and compute the Gabor transform between frequencies
## 0 and 0.125 Hz:
x <- 1:512
chirp <- sin(2*pi*(x + 0.002*(x-256)*(x-256))/16)
par(mfrow=c(3,1))
plot(ts(chirp), xaxs="i", xlab="", ylab="")
title('Chirp signal')
cgtchirp <- mycgt(chirp, 50, .005, 25)
tmp <- cleanph(cgtchirp, .01)
## The result is displayed in Figure 3.5
mycgt <- function (input, nvoice, freqstep = (1/nvoice),
scale = 1, plot = TRUE) {
oldinput <- input
isize <- length(oldinput)
tmp <- adjust.length(oldinput)
input <- tmp$signal
newsize <- length(input)
pp <- nvoice
Routput <- matrix(0, newsize, pp)
Ioutput <- matrix(0, newsize, pp)
output <- matrix(0, newsize, pp)
dim(Routput) <- c(pp * newsize, 1)
dim(Ioutput) <- c(pp * newsize, 1)
dim(input) <- c(newsize, 1)
z <- .C("Sgabor", as.single(input), Rtmp = as.double(Routput),
Itmp = as.double(Ioutput), as.integer(nvoice), as.single(freqstep),
as.integer(newsize), as.single(scale), PACKAGE="Rwave")
Routput <- z$Rtmp
Ioutput <- z$Itmp
dim(Routput) <- c(newsize, pp)
dim(Ioutput) <- c(newsize, pp)
i <- sqrt(as.complex(-1))
output <- Routput[1:isize, ] + Ioutput[1:isize, ] * i
if (plot) {
image(1:newsize, seq(0, nvoice*freqstep/2, length=nvoice),
Mod(output), xlab = "Time", ylab = "Frequency")
title("Gabor Transform Modulus")
}
output
}
没有合适的资源?快使用搜索试试~ 我知道了~
whzw.rar_sfl
共165个文件
html:99个
r:25个
rds:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 81 浏览量
2022-09-23
03:16:52
上传
评论
收藏 533KB RAR 举报
温馨提示
时频分析使用的源代码,希望对大家有用,接着上传!
资源详情
资源评论
资源推荐
收起资源包目录
whzw.rar_sfl (165个子文件)
backscatter.1.000 103KB
backscatter.1.180 103KB
backscatter.1.220 101KB
2DESCRIPTION 1KB
pixel_8.7 27KB
pixel_8.8 27KB
pixel_8.9 27KB
A0 4KB
A4 7KB
AnIndex 2KB
click.asc 43KB
B0 4KB
B4 7KB
C0 5KB
C4 7KB
Rwave.chm 71KB
D0 6KB
D4 8KB
chirpm5db.dat 234KB
noisy.dat 77KB
pure.dat 76KB
Rwave.dll 128KB
Rwave.Rd.gz 15KB
HeartRate 39KB
HOWAREYOU 96KB
00Index.html 16KB
fastkernel.html 5KB
regrec.html 4KB
snakoid.html 4KB
gcrcrec.html 4KB
gregrec.html 4KB
snake.html 4KB
crcrec.html 3KB
corona.html 3KB
coronoid.html 3KB
gridrec.html 3KB
regrec2.html 3KB
ridrec.html 3KB
crc.html 3KB
cfamily.html 3KB
cwtp.html 3KB
zeroskeleton2.html 3KB
icm.html 3KB
zeroskeleton.html 3KB
scrcrec.html 3KB
mw.html 2KB
rkernel.html 2KB
skeleton.html 2KB
cwt.html 2KB
hurst.est.html 2KB
fastgkernel.html 2KB
cwtth.html 2KB
cwtsquiz.html 2KB
dog.html 2KB
gkernel.html 2KB
skeleton2.html 2KB
cwtpolar.html 2KB
kernel.html 2KB
mntrim.html 2KB
mbtrim.html 2KB
cgt.html 2KB
mrecons.html 2KB
gwave2.html 2KB
ext.html 2KB
morwave2.html 2KB
gwave.html 2KB
wRidgeSampling.html 2KB
morwave.html 2KB
plotwt.html 2KB
plotResult.html 2KB
tfgmax.html 2KB
morlet.html 2KB
RidgeSampling.html 2KB
vgt.html 2KB
vecmorlet.html 2KB
tfpct.html 2KB
vecgabor.html 2KB
smoothwt.html 2KB
cwtimage.html 2KB
zerokernel.html 1KB
tfvar.html 1KB
tfmean.html 1KB
gabor.html 1KB
crfview.html 1KB
dwinverse.html 1KB
wv.html 1KB
vdog.html 1KB
vwt.html 1KB
gsampleOne.html 1KB
cleanph.html 1KB
tflmax.html 1KB
snakeview.html 1KB
sridrec.html 1KB
epl.html 1KB
check.maxresoln.html 1KB
svd.html 1KB
adjust.length.html 1KB
wspec.pl.html 1KB
wpl.html 1KB
smoothts.html 1KB
共 165 条
- 1
- 2
weixin_42653672
- 粉丝: 93
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0