Closed bnicenboim closed 2 years ago
Hi, I see that if I use a matrix of more than one column, the output in spec is a matrix:
spec
fs <- 256 secs <- 10 freq <- 30 ampl <- 1 t <- seq(0, secs, length.out = fs * secs) x <- ampl * cos(freq * 2 * pi * t) + runif(length(t)) X <- as.matrix(cbind(x,x)) Pxx <- gsignal::pwelch(X, fs = fs) # no plot ## returns a matrix Pxx$spec
I would expect that it would be the case if I use a matrix of one column as well:
Pxx2 <- gsignal::pwelch(X[,1, drop = FALSE], fs = fs) # no plot ## doesn't return a matrix Pxx2$spec
but it's not the case. (I used the latest version in github).
Hi,
Thanks for this report. I fixed this in v0.3-5.9000 pushed to Github just now.
Best, Geert
Hi, I see that if I use a matrix of more than one column, the output in
spec
is a matrix:I would expect that it would be the case if I use a matrix of one column as well:
but it's not the case. (I used the latest version in github).