elec_emse2matlab

elec_emse2matlab - function elp =...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
function elp = elec_emse2matlab(filename) % elec_emse2matlab - Read an EMSE probe file (*.elp) % % Usage: elp = elec_emse2matlab(filename) % % This script extracts x,y,z values from an EMSE % probe (*.elp) file, only if it contains EEG % electrodes. % % EMSE *.elp files are in meters. Also, when using % EMSE *.elp files in the eeg_toolbox, it is necessary % to swap X and Y. This is handled by elec_open % % An example of the elp struct returned follows: % % version: 3 % filetype: 2 % minor_rev: 1 % sensorType: 4001 % sensorN: 125 % nasion: [0.0957 0 0] % lpa: [-7.1503e-004 0.0804 0] % rpa: [7.1503e-004 -0.0804 0] % x: [124x1 double] % y: [124x1 double] % z: [124x1 double] % ref: [0.0089 -0.0732 -0.0214] % origin: [-0.0083 0.0043 0.0496] % type: {124x1 cell} % name: {124x1 cell} % % See also: ELEC_OPEN, ELEC_LOAD % % $Revision: 1.1 $ $Date: 2009/04/28 22:13:54 $ % Licence: GNU GPL, no express or implied warranties % History: 10/2002, Darren.Weber_at_radiology.ucsf.edu % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% [path,name,ext] = fileparts(filename); file = fullfile(path,[name ext]); [fid,msg] = fopen(file,'r'); if ~isempty(msg), error(msg); end ver = '$Revision: 1.1 $'; fprintf('\nELEC_EMSE2MATLAB [v %s]\n',ver(11:15)); fprintf('. ..reading .elp data.\n'); tic elp = read_elp(fid); t = toc; fprintf('done (%6.2f sec).\n',t); return
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [elp] = read_elp(fid) elp = []; % Probe files contain position information for electrode locations % and/or gradiometer locations. The file consists of a prolog, a % header, and a list of one or more sensor fields. % Any line beginning with '//' is a comment line, which is ignored
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

elec_emse2matlab - function elp =...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online