Home > eeg > egis > spline > laplacian_trial.m

laplacian_trial

PURPOSE ^

lap_trialdata = laplacian_trial(trialdata,good_chan,xelec,yelec,zelec)

SYNOPSIS ^

function lap_trialdata = laplacian_trial(trialdata,good_chan,xelec,yelec,zelec)

DESCRIPTION ^

 lap_trialdata = laplacian_trial(trialdata,good_chan,xelec,yelec,zelec)

take the laplacian of a trial of data 
        

 trialdata = data with channels as columns
good_chan = good channel list
xelec,yelec,zelec = x,y,z, electrode positions

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function lap_trialdata = laplacian_trial(trialdata,good_chan,xelec,yelec,zelec)
0002 % lap_trialdata = laplacian_trial(trialdata,good_chan,xelec,yelec,zelec)
0003 %
0004 %take the laplacian of a trial of data
0005 %
0006 %
0007 % trialdata = data with channels as columns
0008 %good_chan = good channel list
0009 %xelec,yelec,zelec = x,y,z, electrode positions
0010 if nargin ~= 5
0011     error('incorrect number of input arguments')
0012 end
0013 v = zeros(1,size(good_chan,2));
0014 x = zeros(1,size(good_chan,2));
0015 y = zeros(1,size(good_chan,2));
0016 z = zeros(1,size(good_chan,2));
0017 x = xelec(good_chan);
0018 y = yelec(good_chan);
0019 z = zelec(good_chan);
0020 welec= 1;
0021 [k,kinv,a,ainv,e]= k_and_e(welec,x,y,z);
0022 for samp = 1:size(trialdata,1)
0023     w = trialdata(samp,:);
0024     v = w(good_chan);
0025     [p,q,error_check]= mateqs(welec,x,y,z,v,k,kinv,a,ainv,e);
0026     v_lap = spherical_lap(welec,x,y,z,x,y,z,p,q);
0027     lap_trialdata(samp,good_chan) = v_lap;
0028 end; %for samp = 1:chdr(c,NPoints)

Generated on Wed 20-Sep-2023 04:00:50 by m2html © 2003