Skip to content

Laboratory of Neuropsychology

Environmental Variables


Environmental variables are used to hold default values for various MatOFF operations.  Environmental variables are controlled using theMatOFF Setenv command.  It is common to initialize these values in STARUP.PRO. (See Getting Started.)  The MatOFF Batch command simulates a DOS batch file environment and the environmental variables can in a MatOFF batch file.  This feature adds to the scripting power of MatOFF. (See Scripting.)  On Windows 98 machines, it is possible to open a DOS window and set the environmental variables before running MATLAB, although this feature is now simply for backwards compatibility.


Example using the DOS "set" command inside a batch file.  The batch file must be run with the MatOFF Batch command.


Example using Setenv command

setenv datapath c:\mydata

A list of the environmental variables

ANALOGSTART Event code that triggers start of analog recording. Usually code 100. 
Event code must be under 10,000.
ANALOGSTOP Event code that signals the end of analog recording. Usually code 101.
Event code must be under 10,000.
DATAPATH  Path for all data files
DEFAULTPATH Path used when no alternate path is defined with other environment variables. The current directory is used if this variable is not set.  See the Pwd command.
DISPLAYUNITS Use 'absolute' unless you are process a very old PCOFF file.  See the Axis command for details.
DUMPLABEL Text string that will be used in the header of Set <process> SHOW/KEEP listings.
DUMPMODE Set to APPEND to append lines with the Dump spikes command.
DUMPPATH  Path for files created by the Set or Dump commands.
DUMPTEXT Added to each line of output in the Dump spikes file.
EDITOR Path and file for the default text editor
EOGSAMPLERATE Default sample rate for A/D data.
EVENTCODEFILE File that describes each event code. Used by Makdat for debugging messages.
FORMATPATH Path for *.FMT ASCII output format files. See Exporting results.
GRAPHICSFORMAT Sets the graphics file format saved with the Plot command.
HISTORYPATH Location of user's history script.
LAYOUTPATH Default directory for storing KOFLAY.DAT and other saved layouts.  See the Layout command.
MAKDAT Default option settings to use for the Makdat command.
MAKDUMP All Makdat command debugging information will be dumped to file specified by this variable.
MAXINPUTTRIALS Special debugging option for the Makdat command.  See notes below.
MAXTRIALSFOUND Limits the number of matches a sequence can make.  
METACHAR1  Sets the ASCII character used to identify parameters for metafiles.  See Scripting language. The default value is "$".
METACHAR2  Sets the ASCII character used to identify MatOFF command line parameters for metafiles. See Scripting language.  The default value is "%".
METAPATH  Path used to find metafiles.
PLOTPATH  Path for plot files. See the Plot command.
PROTOCOLPATH  Path for protocol files. See Scripting language and the Load command.
REMAPFILE Name of file that defines which Cortex event codes are treated as spikes. See the Makdat command.
STATPATH  Path for all statistical results files (.MWU, .EPK, etc.)