Commit 4647081c authored by Sazhumyan, Marina's avatar Sazhumyan, Marina
Browse files

Upload New File

parent 90472695
function pipe_doPLV(pipeSpecs)
subjIds = checkStatus;
newdataSelectArr = []; dataSelectArr = []; goTrigger = false; nogoTrigger = false;
load(pipeSpecs.sourcename);
if ~exist('TF','var')
load(pipeSpecs.auxsourcename,'TF');
goTrigger = logical(TF.goTrigger); nogoTrigger = logical(TF.nogoTrigger);
times = wvTimes;
%%%%define the baselines
baseline_window = [-50];
baseidx = 1;
[~,baseidx(2)] = min(abs(times-baseline_window(1)));
plvGo = pn_eeg_rPLV(angle(wvData),goTrigger,baseidx); % use the phase data in radians as input data
plvNogo = pn_eeg_rPLV(angle(wvData),nogoTrigger,baseidx);
elseif ~exist('wvTimes', 'var')
goTrigger = logical(TF.goTrigger); nogoTrigger = logical(TF.nogoTrigger);
times = TF.times;
%%%%define the baselines
baseline_window = [-50];
baseidx = 1;
[~,baseidx(2)] = min(abs(times-baseline_window(1)));
% baseline = wvTimes(baseidx(1):baseidx(2));
plvGo = pn_rPLV(angle(TF.data),goTrigger,baseidx); % use the phase data in radians as input data
plvNogo = pn_rPLV(angle(TF.data),nogoTrigger,baseidx);
end
save(pipeSpecs.targetname, 'plvGo','plvNogo', 'times');
return
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment