search for: nextn

Displaying 14 results from an estimated 14 matches for "nextn".

Did you mean: next
2007 Feb 06
0
convolve: request for "usual" behaviour + some improvements + some fixes
...er > > Herve> (a length of 2^n is the best case for the fft, the worst case > being > when > > Herve> the length is a prime number): > ... > > The typical approach here and definitely the idea of the > > original author of convolve() - would be to use nextn() here > > instead of "next_power_of_2()". > > The current implementation of convolve uses an fft-buffer of length > nx + ny - 1 for "open" convolution, not nextn(). > The fft-based convolution is by nature "circular". However it can be > used fo...
2009 Sep 16
3
fft help
...ipating seeing a spike at 10Hz with the function 10* sin(2*pi*10*t). I can't figure out why my plots do not show spikes at the frequencies I expect. Am I doing something wrong or is my expectations wrong? require(stats) layout(matrix(c(1,2,3), 3, 1, byrow = TRUE)) #SETUP n <- 256 #nextn(1001) gives next power 2 F <- 100 #Hz -50 to 50 Hz dt <- 1/F T <- n*dt df <- 1/T t <- seq(0,T,by=dt) #also try ts function t<-t[1:length(t)-1] freq <- 5 #Hz #SIGNAL FUNCTION y <- 10* sin(2*pi*10*t) #10*sin(2*pi*freq*t) #FREQ ARRA...
2003 Feb 14
3
Change array size
Hi, I would like to know if there is a way to change a vector of arbitrary size to make it fits the nearest upper size multiple of a power of 2. -- Cordialy ---------------------------------------- Emmanuel POIZOT Cnam/Intechmer Digue de Collignon 50110 Tourlaville T?l : (33)(0)2 33 88 73 42 Fax : (33)(0)2 33 88 73 39 -----------------------------------------
2013 Jun 23
1
stats::convolve documentation enhancement
...ot;, then length(x)+length(y)-1 should have many factors (e.g. length(x)+length(y)-1 = 2^n) In particular the latter may not be obvious to first time users, who may think that stats::convolve is slow, even though it is fast, if applied correctly. Moreover for zero padding, one may apply stats::nextn to (a) length(x) or (b) length(x)+length(y)-1. #Example: #correct usage: x <- rnorm(514289) y <- rnorm(10000) #length(x) + length(y) - 1 = 2^19 system.time(convolve(x, y, type="open")) # user system elapsed # 1.17 0.02 1.18 #incorrect usage: x <- rnorm(300000)...
2003 Mar 11
3
fft help
Hi R-users: I want to know if there is an easy way to obtain a Fourier Transform form a vector or an array (just like fft does), but with a more density base. I mean, if I have a vector of 512 of length, I want the Fourier Transform to be 1024, or 2048, etc, in length (de u domain). Or should I modify the fft C code to do that? If I want to modify the precision of the fft function, which
2019 Feb 14
0
Proposed speedup of spec.pgram from spectrum.R
...## to correct for tapering: Bloomfield (1976, p. 194) ## Total taper is taper*2 u2 <- (1 - (5/8)*taper*2) u4 <- (1 - (93/128)*taper*2) if (pad > 0) { x <- rbind(x, matrix(0, nrow = N * pad, ncol = ncol(x))) N <- nrow(x) } NewN <- if(fast) nextn(N) else N x <- rbind(x, matrix(0, nrow = (NewN - N), ncol = ncol(x))) N <- nrow(x) Nspec <- floor(N/2) freq <- seq.int(from = xfreq/N, by = xfreq/N, length.out = Nspec) xfft <- mvfft(x) pgram <- array(NA, dim = c(N, ncol(x), ncol(x))) for (i in 1L:ncol(...
2018 Dec 20
0
R 3.5.2 is released
...creased warning level. * Parse data now have deterministic parent nodes (PR#16041). * Calling match() with length one x and POSIXlt table gave a segfault (PR#17459). * Fork clusters could hang due to a race condition in cluster initialization (makeCluster()). * nextn(n) now also works for larger n and no longer loops infinitely for e.g, n <- 214e7. * cooks.distance() and rstandard() now work correctly for multiple linear models ("mlm"). * polym() and corresponding lm() prediction now also work for a boundary "vector...
2018 Dec 20
0
R 3.5.2 is released
...creased warning level. * Parse data now have deterministic parent nodes (PR#16041). * Calling match() with length one x and POSIXlt table gave a segfault (PR#17459). * Fork clusters could hang due to a race condition in cluster initialization (makeCluster()). * nextn(n) now also works for larger n and no longer loops infinitely for e.g, n <- 214e7. * cooks.distance() and rstandard() now work correctly for multiple linear models ("mlm"). * polym() and corresponding lm() prediction now also work for a boundary "vector...
2004 Oct 04
7
R 2.0.0 is released
...o chull() has been moved to package graphics (as it uses xy.coords). o There is now a coef() method for summaries of "nls" objects. o compareVersion(), packageDescription() and read.00Index() have been moved to package 'utils'. o convolve(), fft(), mvfft() and nextn() have been moved to package stats. o coplot() now makes use of cex.lab and font.lab par() settings. o cumsum/prod/max/min() now preserve names. o data(), .path.packages() and .find.packages() now interpret package = NULL to mean all loaded packages. o data.frame() and its rep...
2004 Oct 04
7
R 2.0.0 is released
...o chull() has been moved to package graphics (as it uses xy.coords). o There is now a coef() method for summaries of "nls" objects. o compareVersion(), packageDescription() and read.00Index() have been moved to package 'utils'. o convolve(), fft(), mvfft() and nextn() have been moved to package stats. o coplot() now makes use of cex.lab and font.lab par() settings. o cumsum/prod/max/min() now preserve names. o data(), .path.packages() and .find.packages() now interpret package = NULL to mean all loaded packages. o data.frame() and its rep...
2004 Apr 12
1
R 1.9.0 is release
...on operators did not warn about inconsistent lengths for real vectors, but did for integer, logical and character vectors. o spec.pgram(x, ..., pad, fast, ...) computed the periodogram with a bias (downward) whenever 'pad > 0' (non-default) or 'fast = TRUE' (default) and nextn(n) > n where n = length(x); similarly for 'df' (approximate degrees of freedom for chisq). o dgamma(0, a) now gives Inf for a < 1 (instead of NaN), and so does dchisq(0, 2*a, ncp). o pcauchy() is now correct in the extreme tails. o file.copy() did not check that any e...
2004 Apr 12
1
R 1.9.0 is release
...on operators did not warn about inconsistent lengths for real vectors, but did for integer, logical and character vectors. o spec.pgram(x, ..., pad, fast, ...) computed the periodogram with a bias (downward) whenever 'pad > 0' (non-default) or 'fast = TRUE' (default) and nextn(n) > n where n = length(x); similarly for 'df' (approximate degrees of freedom for chisq). o dgamma(0, a) now gives Inf for a < 1 (instead of NaN), and so does dchisq(0, 2*a, ncp). o pcauchy() is now correct in the extreme tails. o file.copy() did not check that any e...
2000 Feb 17
2
Installation of rpm file on Suse Linux 6.2 (PR#449)
.../R/library/base/R-ex/name.R action: create D: file: /usr/local/lib/R/library/base/R-ex/names.R action: create D: file: /usr/local/lib/R/library/base/R-ex/nargs.R action: create D: file: /usr/local/lib/R/library/base/R-ex/nchar.R action: create D: file: /usr/local/lib/R/library/base/R-ex/nextn.R action: create D: file: /usr/local/lib/R/library/base/R-ex/nhtemp.R action: create D: file: /usr/local/lib/R/library/base/R-ex/nlevels.R action: create D: file: /usr/local/lib/R/library/base/R-ex/nlm.R action: create D: file: /usr/local/lib/R/library/base/R-ex/noquote.R action: create...
2002 Jul 11
1
dyn.load tcl/tk (PR#1774)
...text html latex example naprint text html latex nargs text html latex example nchar text html latex example nclass text html latex nextn text html latex example nhtemp text html latex example nlevels text html latex example nlm text html latex example noquote...