Home > bioelectromagnetism > eeg_lap_hjorth.m

eeg_lap_hjorth

PURPOSE ^

eeg_lap_hjorth - 2D Laplacian of Potential at XY

SYNOPSIS ^

function [Hjorth] = eeg_lap_hjorth(voltage,X,Y)

DESCRIPTION ^

 eeg_lap_hjorth - 2D Laplacian of Potential at XY

 Useage: [Hjorth] = eeg_lap_hjorth(voltage [,X,Y])

 The Hjorth nearest neighbour, finite difference Laplacian.
 For a continuous approximation of the Laplacian, use the
 'eeg_lap' function.

 This routine simply calls the del2 matlab command, which requires
 'voltage' to be a rectangular matrix.  See 'help del2', esp:

 L = DEL2(U,HX,HY) when U is 2-D, uses the spacing specified by HX
     and HY. If HX is a scalar, it gives the spacing between points in
     the x-direction. If HX is a vector, it must be of length SIZE(U,2)
     and specifies the x-coordinates of the points.  Similarly, if HY
     is a scalar, it gives the spacing between points in the
     y-direction. If HY is a vector, it must be of length SIZE(U,1) and
     specifies the y-coordinates of the points.

 For example:

 [x,y] = meshgrid(-10:.5:10);
 z = (x.^2).*(y.^2); % simulate monotonic potential
 del2z = 4*del2(z);  % calculate Hjorth laplacian
 figure('name','potential vs laplacian','numbertitle','off','position',[500 10 512 512]);
 subplot(2,1,1); surf(x,y,z);
 title('potential'); shading interp; colorbar; rotate3d; axis tight
 subplot(2,1,2); surf(x,y,del2z), 
 title('Hjorth laplacian'); shading interp; colorbar; rotate3d; axis tight

 refs:  Hjorth B (1975).  An on-line transformation of EEG scalp
          potentials into orthogonal source derivations. 
          Electroencephalography & Clinical Neurophysiology, 39: 526-530.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [Hjorth] = eeg_lap_hjorth(voltage,X,Y)
0002 
0003 % eeg_lap_hjorth - 2D Laplacian of Potential at XY
0004 %
0005 % Useage: [Hjorth] = eeg_lap_hjorth(voltage [,X,Y])
0006 %
0007 % The Hjorth nearest neighbour, finite difference Laplacian.
0008 % For a continuous approximation of the Laplacian, use the
0009 % 'eeg_lap' function.
0010 %
0011 % This routine simply calls the del2 matlab command, which requires
0012 % 'voltage' to be a rectangular matrix.  See 'help del2', esp:
0013 %
0014 % L = DEL2(U,HX,HY) when U is 2-D, uses the spacing specified by HX
0015 %     and HY. If HX is a scalar, it gives the spacing between points in
0016 %     the x-direction. If HX is a vector, it must be of length SIZE(U,2)
0017 %     and specifies the x-coordinates of the points.  Similarly, if HY
0018 %     is a scalar, it gives the spacing between points in the
0019 %     y-direction. If HY is a vector, it must be of length SIZE(U,1) and
0020 %     specifies the y-coordinates of the points.
0021 %
0022 % For example:
0023 %
0024 % [x,y] = meshgrid(-10:.5:10);
0025 % z = (x.^2).*(y.^2); % simulate monotonic potential
0026 % del2z = 4*del2(z);  % calculate Hjorth laplacian
0027 % figure('name','potential vs laplacian','numbertitle','off','position',[500 10 512 512]);
0028 % subplot(2,1,1); surf(x,y,z);
0029 % title('potential'); shading interp; colorbar; rotate3d; axis tight
0030 % subplot(2,1,2); surf(x,y,del2z),
0031 % title('Hjorth laplacian'); shading interp; colorbar; rotate3d; axis tight
0032 %
0033 % refs:  Hjorth B (1975).  An on-line transformation of EEG scalp
0034 %          potentials into orthogonal source derivations.
0035 %          Electroencephalography & Clinical Neurophysiology, 39: 526-530.
0036 %
0037 
0038 % $Revision: 1.1 $ $Date: 2004/11/12 01:32:33 $
0039 
0040 % Licence:  GNU GPL, no implied or express warranties
0041 % History:  06/01, Darren.Weber_at_radiology.ucsf.edu
0042 %
0043 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0044 
0045 if ~exist('X','var') X = 1; end
0046 if ~exist('Y','var') Y = 1; end
0047 
0048 Hjorth = 4*del2(voltage,X,Y);
0049 
0050 return

Generated on Mon 15-Aug-2005 15:36:19 by m2html © 2003