elec_load - function [elec,type,X,Y,Z,theta,phi,r] =

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

View Full Document Right Arrow Icon
function [elec,type,X,Y,Z,theta,phi,r] = elec_load(filename,coordinates,xo,yo,zo,N) % elec_load - Read ascii electrode file % % Load an ascii electrode file and return % the electrode labels and coordinates. This % function can read and return Cartesian (x,y,z) % and/or spherical (theta,phi,r) coordinates. % % The ascii file format is that of NeuroScan % 3Dspace export files. Each row of the file % comprises an electrode label, an electrode % type code (see below), and the x,y,z % coordinates (cm). Each field is separated % by spaces. For example, % % Fz 69 Xcm Ycm Zcm % % Usage: % % [elec,type,X,Y,Z,theta,phi,r] = elec_load(file,[coordinates],[xo],[yo],[zo],[N]) % % where: % % file = 'path\filename' with row format: % % '%s %d %f %f %f' = [elec_label, type, (X,Y,Z) or (theta,phi,r)] % % N is how many electrodes to load (129 default). % (xo,yo,zo) are the origin {(0,0,0) default}. % % coordinates is a string option for input data type: % 'Cartesian' = cartesian in Neuroscan 3Dspace format (default); % format is ['label' type X Y Z]. % % As of 08/2003, it is better to use % elec_load_scan_3ddasc for Neuroscan 3Dspace % ascii export files (*.dat). Otherwise, try % this function. % % 'Spherical1' = spherical, theta and phi in degrees, % 'Spherical2' = spherical, theta and phi in radians, % format is ['label' type theta phi r] % % theta is counterclockwise rotation from +x in x-y plane (azimuth), % phi is elevation with respect to z-axis, r is radius in cm,
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

elec_load - function [elec,type,X,Y,Z,theta,phi,r] =

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

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