Home > chronux_2_00 > spikesort > utility > datatools > leadingedges.m

leadingedges

PURPOSE ^

LEADINGEDGES Marks 0 -> NONZERO transitions along data columns.

SYNOPSIS ^

function markers = leadingedges(data)

DESCRIPTION ^

LEADINGEDGES      Marks 0 -> NONZERO transitions along data columns.
   EDGEMARKERS = LEADINGEDGES(DATA) takes an M x N matrix DATA and
   returns a M x N matrix EDGEMARKERS, containing a '1' in each location
   that corresponds to the first nonzero value in a DATA column following
   one or more zeros above it in the same column.  If the first row of
   any DATA column contains a nonzero value, it will be marked in
   EDGEMARKERS.

   DATA can be a matrix of type double, uint8, or logical; in all of
   these cases, EDGEMARKERS is of type logical.  DATA should not contain
   NaN values.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function markers = leadingedges(data)
0002 %LEADINGEDGES      Marks 0 -> NONZERO transitions along data columns.
0003 %   EDGEMARKERS = LEADINGEDGES(DATA) takes an M x N matrix DATA and
0004 %   returns a M x N matrix EDGEMARKERS, containing a '1' in each location
0005 %   that corresponds to the first nonzero value in a DATA column following
0006 %   one or more zeros above it in the same column.  If the first row of
0007 %   any DATA column contains a nonzero value, it will be marked in
0008 %   EDGEMARKERS.
0009 %
0010 %   DATA can be a matrix of type double, uint8, or logical; in all of
0011 %   these cases, EDGEMARKERS is of type logical.  DATA should not contain
0012 %   NaN values.
0013 
0014 if (issparse(data)),  error('Sparse matrices can not be used with LEADINGEDGES.');  end
0015 
0016 markers = CORE_leadingedges(data);

Generated on Fri 15-Aug-2008 11:35:42 by m2html © 2003