From: Benjamin Auder Date: Tue, 31 Jan 2017 15:17:55 +0000 (+0100) Subject: avancée sur compréhension de epclust/R/stage2.R X-Git-Url: https://git.auder.net/variants/img/pieces/assets/config.php?a=commitdiff_plain;h=c6556868ed56e8c8dea8035240f0f9db7844f382;p=epclust.git avancée sur compréhension de epclust/R/stage2.R --- diff --git a/epclust/R/stage2.R b/epclust/R/stage2.R index ebb44d9..254092c 100644 --- a/epclust/R/stage2.R +++ b/epclust/R/stage2.R @@ -13,8 +13,8 @@ library("Rwave") #toCWT: (aux) ##NOTE: renvoie une matrice 3D -toCWT <- function(X, sw= 0, tw= 0, swabs= 0, nvoice= 12, noctave= 5, s0= 2, w0= 2*pi, - lt= 24, dt= 0.5, spectra = FALSE, smooth = TRUE, scaled = FALSE, scalevector) +toCWT <- function(X, sw=0, tw=0, swabs=0, nvoice=12, noctave=5, s0=2, w0=2*pi, + lt=24, dt=0.5, spectra=FALSE, smooth=TRUE, scaled=FALSE, scalevector) { noctave <- adjust.noctave(lt, dt, s0, tw, noctave) if(missing(scalevector)) @@ -37,6 +37,21 @@ toCWT <- function(X, sw= 0, tw= 0, swabs= 0, nvoice= 12, noctave= 5, s0= 2, resArray } +#from sowas +adjust.noctave <- function(N,dt,s0,tw,noctave) +{ + if (tw>0) + { + dumno <- as.integer((log(N*dt)-log(2*tw*s0))/log(2)) + if (dumno taille ??! + mat1 <- vect2mat(Xcwt2[i,], delta, lscvect) + + for(j in (i + 1):n) { - mat2 <- vect2mat(Xcwt2[j,]) + mat2 <- vect2mat(Xcwt2[j,], delta, lscvect) num <- Mod(mat1 * Conj(mat2)) WX <- Mod(mat1 * Conj(mat1)) WY <- Mod(mat2 * Conj(mat2)) @@ -166,5 +195,5 @@ step2 = function(conso) } } diag(Xwer_dist) <- numeric(n) - Wwer_dist + Xwer_dist }