Makinen | R Documentation |
Generates Signal as per Makinen et. al 2005 paper
Makinen (frames, epochs, srate, position)
frames |
number of signal frames per each trial |
epochs |
number of simulated trials |
srate |
sampling rate of simulated signal in Hz |
position=frames/2 |
position of the reset [in frames]; default: in the middle |
Generate simulated data by summing 4 phase reset sinusoids with freqencies chosen randomly from range 4-16Hz. Has the same parameters as phasereset except the parameters describing the frequency range.
signal |
simulated EEG signal; vector: 1 by frames*epochs containing concatenated trials |
Adapted from Yeung N,Bogacz R, Holroyd C, Nieuwenhuis S, Cohen J
https://data.mrc.ox.ac.uk/data-set/simulated-eeg-data-generator
#mymak = Makinen (200, 1, 250, 115) #plot (mymak) ## The function is currently defined as Makinen <- function(frames, epochs, srate, position = frames / 2) { signal <- replicate(epochs * frames, 0)#generating empty wave #print(length(signal)) for (i in 1:4) { #repeat for 4 sinusoids new_signal <- phasereset(frames, epochs, srate, 4, 16, position) #print(length(new_signal)) signal = signal + new_signal#add new sin to summation } return(signal) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.