| plot.signal | R Documentation |
Quickfire way to Plot EEG noise, peak, or signal
plot.signal(data,mark,title)
data |
Vector to Plot |
mark |
Optional int, add horixontal line marker |
title |
Optional string, add title |
Rose Connolly connolr3@tcd.ie
# mysignal<-noise(200,10,250)+7*peak(200,10,250,7,115)
#firstsignal<-mysignal[1:200]
#plot.signal(firstsignal,mark=115,title="Classicaly generated Signal with Peak")
plot.signal <- function(data, mark = NULL, title = "EEG Signal") {
plot(data, main = title, type = "l")
# this if statement and corresponding code is applicable for phase resetting theory only
if (is.null(mark) == FALSE) {
abline(v = mark, col = "red")
text(mark + 5, 0.25, paste(mark), srt = 90, col = "red")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.