plotcurves
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plotcurves [2010/06/19 19:03] – added output reference jochen | plotcurves [2011/05/27 15:54] (current) – added additional keyboard commands jochen | ||
---|---|---|---|
Line 24: | Line 24: | ||
% this filters channel 1 into a new channel (10) | % this filters channel 1 into a new channel (10) | ||
- | % all parameters are default, the post-filtering cut-off is set to 0.5s | + | % all parameters are default, the post-filtering cut-off is set to 0.2s |
- | gsr.Filter(1, | + | gsr.Filter(1, |
===== Function reference ('help plotcurves' | ===== Function reference ('help plotcurves' | ||
Line 36: | Line 36: | ||
obj xff object with plotable data or SxC double data | obj xff object with plotable data or SxC double data | ||
opts optional settings | opts optional settings | ||
+ | | ||
+ | fixed interval!; default: -2) | ||
| | ||
containing [channelnumber, | containing [channelnumber, | ||
- | for multiple | + | |
- | | + | - onset and offset are given in seconds |
- | .resfreq | + | |
+ | | ||
+ | | ||
+ | | ||
+ | .ochannel | ||
+ | | ||
+ | | ||
+ | | ||
| | ||
- | | + | |
- | | + | |
| | ||
| | ||
- | {' | + | |
| | ||
| | ||
+ | | ||
| | ||
| | ||
{' | {' | ||
- | | ||
Output fields: | Output fields: | ||
Line 59: | Line 67: | ||
varc computed variables | varc computed variables | ||
spot updated spots | spot updated spots | ||
- | sets updates sets (new indices)</ | + | sets updates sets (new indices) |
+ | |||
+ | Note: where appropriate, | ||
+ | if not specified in the call!</ | ||
===== GUI ===== | ===== GUI ===== | ||
Line 82: | Line 93: | ||
* ''' | * ''' | ||
* ''' | * ''' | ||
+ | * ''' | ||
* ''' | * ''' | ||
+ | * ''' | ||
* ''' | * ''' | ||
* ''' | * ''' | ||
Line 157: | Line 170: | ||
<code matlab plotcurves_withonsets.m> | <code matlab plotcurves_withonsets.m> | ||
- | % we define | + | % for this example |
+ | % - cue (time of stimulus minus 2 secs) | ||
% - onset (time of stimulus), | % - onset (time of stimulus), | ||
% - delay of response (minimum before peak), | % - delay of response (minimum before peak), | ||
% - and peak of response (amplitude) | % - and peak of response (amplitude) | ||
- | spotnames = {' | + | spotnames = {' |
- | spottype = {' | + | spottype = {' |
% the spot values are set to empty arrays with size 0x2! | % the spot values are set to empty arrays with size 0x2! | ||
% this tells plotcurves to autodetect... | % this tells plotcurves to autodetect... | ||
- | spot = {zeros(0, | + | spot = {zeros(0, |
+ | |||
+ | % then we define the variables of interest: | ||
+ | % NOTE: since we have a CUE spot, all spot indices shift by one! | ||
+ | % - Latency (defined as x-diff between onset and delay) | ||
+ | % - Response time (defined as x-diff between delay and peak) | ||
+ | % - Base amplitude (defined as y-value at delay) | ||
+ | % - Peak amplitude (defined as y-value at peak) | ||
+ | % - Peak-to-peak response amplitude (defined as y-diff between delay and peak) | ||
+ | % additionally, | ||
+ | % should be applied after we're done | ||
+ | vars = struct( ... | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
% re-using the variables definition from above, options: | % re-using the variables definition from above, options: | ||
Line 172: | Line 201: | ||
% - original data is in channel 1 (pre-filter) | % - original data is in channel 1 (pre-filter) | ||
% - onsets are coded in channel 8 (0Volts nothing, 5 Volts boxes) | % - onsets are coded in channel 8 (0Volts nothing, 5 Volts boxes) | ||
+ | % - cue onffset is 2 seconds | ||
+ | % - thus, the window is increased! [-4, 20] | ||
% - variables and spots as defined | % - variables and spots as defined | ||
pcopts = struct( ... | pcopts = struct( ... | ||
Line 177: | Line 208: | ||
' | ' | ||
' | ' | ||
+ | ' | ||
+ | ' | ||
' | ' | ||
' | ' |
plotcurves.1276974208.txt.gz · Last modified: 2010/06/19 19:03 by jochen