@cortex/cortex.m
the @cortex class "constructor"; creates a @cortex object from a disk file
Syntax
CORTEX(FILENAME,CLUSTERS)
Creates and returns a @cortex object from the CORTEX data file specified by FILENAME
. The mandatory CLUSTERS
argument is a numeric vector specifying a set of event codes that should be interpreted as spikes whenever they appear during a trial.
CORTEX(FILENAME)
If the filename extension is 'nex' then the object is created from a .nex file, otherwise the object is created from a @cortex-optimized "dump" file previously created with the SAVE method.
CORTEX
without arguments creates an "empty" @cortex object
Notes
It is not possible to create arrays of @cortex objects. Attempt to execute, for example, c(3)=cortex(file,spikes)
, will result in a weird error.
Support for .nex files is still under development
Examples
% typical call for a file collected in a single-electrode setup:
% c = cortex('h:/mydir/myfile.0', 1:2)