Note that this reference documentation is identical to the help that is displayed in Matlab when you type “help ft_spike_rate”.
FT_SPIKE_RATE computes the firing rate of spiketrains and their variance Use as [rate] = ft_spike_rate(cfg, spike) The input SPIKE should be organised as the spike or the raw datatype, obtained from FT_SPIKE_MAKETRIALS or FT_PREPROCESSING (in that case, conversion is done within the function) Configurations: cfg.outputunit = 'rate' (default) or 'spike'. If 'rate', we convert the output per trial to firing rates (spikes/sec). If 'spike', we count the number spikes per trial. cfg.spikechannel = see FT_CHANNELSELECTION for details cfg.trials = vector of indices (e.g., 1:2:10) logical selection of trials (e.g., [1010101010]) 'all' (default), selects all trials% cfg.trials cfg.vartriallen = 'yes' (default) or 'no'. If 'yes' - accept variable trial lengths and use all available trials and the samples in every trial. If 'no' - only select those trials that fully cover the window as specified by cfg.latency and discard those trials that do not. cfg.latency = [begin end] in seconds 'maxperiod' (default) 'minperiod', i.e., the minimal period all trials share 'prestim' (all t<=0) 'poststim' (all t>=0). cfg.keeptrials = 'yes' or 'no' (default). The outputs from spike are the following: - rate.trial: nTrials x nUnits matrix containing the firing rate per unit and trial - rate.avg: nTrials array containing the average firing rate per unit - rate.var: nTrials array containing the variance of firing rates per unit - rate.dof: nTrials array containing the degree of freedom per unit - rate.label: nUnits cell array containing the labels of the neuronal units%
Share this page: