View source: R/read.empi.db.file.R
| read.empi.db.file | R Documentation |
Reads data from a SQLite file (.db) created by the Matching Pursuit algorithm.
The reconstructed signal(s) and Gabor function(s) are also returned.
read.empi.db.file(db.file)
db.file |
SQLite file. |
Detailed parameters of all the generated atoms
Original input signal(s)
Reconstructed signal(s), as the sum of generated atoms
Generated Gabor atoms
time stamps
sampling rate
## Not run:
file <- system.file("extdata", "EEG.db", package = "MatchingPursuit")
out <- read.empi.db.file(file)
n.channnels <- ncol(out$original.signal)
original.signal <- out$original.signal
reconstruction <- out$reconstruction
t <- out$t
f <- out$f
old.par <- par("mfrow", "pty", "mai")
par(mfrow = c(2, 1))
par(pty = "m")
par(mai = c(0.9, 0.5, 0.3, 0.4))
plot(
original.signal[,1], type = "l", col = "blue",
main = paste("channel: ", 1, " / " , n.channnels, " (original signal)", sep = ""),
xaxt = "n", ylab = "", xlab = "time [sec]"
)
len <- length(original.signal[, 1])
lab <- seq(t[1], t[len] + 1 / f, length.out = 11)
axis(side = 1, las = 1, cex.axis = 0.9, at = seq(0, len, length.out = 11), labels = lab)
plot(
reconstruction[,1], type = "l", col = "blue",
main = paste("channel: ", 1, " / " , n.channnels, " (reconstructed signal)", sep = ""),
xaxt = "n", ylab = "", xlab = "time [sec]"
)
axis(side = 1, las = 1, cex.axis = 0.9, at = seq(0, len, length.out = 11), labels = lab)
par(old.par)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.