Home > FMAToolbox > Analyses > PhaseMap.m

PhaseMap

PURPOSE ^

PhaseMap - Compute spatial phase map.

SYNOPSIS ^

function map = PhaseMap(positions,phases,varargin)

DESCRIPTION ^

PhaseMap - Compute spatial phase map.

  Compute phase map (e.g. for a place cell), as well as occupancy and count maps.

  USAGE

    map = PhaseMap(positions,phases,<options>)

    positions      position <a href="matlab:help samples">samples</a>
    phases         phase <a href="matlab:help samples">samples</a> in radians
    <options>      optional list of property-value pairs (see NOTE below)

  NOTE

    This function is provided for convenience. It simply calls <a href="matlab:help Map">Map</a>
    using the same parameters. See this function for details about optional parameters.

  OUTPUT

    The outputs are the same as for <a href="matlab:help Map">Map</a>, except for map.z which is replaced by:

    map.phase       average phase map (in radians)

  SEE

    See also Map, MapStats, FiringCurve, FiringMap, PlotColorMap.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function map = PhaseMap(positions,phases,varargin)
0002 
0003 %PhaseMap - Compute spatial phase map.
0004 %
0005 %  Compute phase map (e.g. for a place cell), as well as occupancy and count maps.
0006 %
0007 %  USAGE
0008 %
0009 %    map = PhaseMap(positions,phases,<options>)
0010 %
0011 %    positions      position <a href="matlab:help samples">samples</a>
0012 %    phases         phase <a href="matlab:help samples">samples</a> in radians
0013 %    <options>      optional list of property-value pairs (see NOTE below)
0014 %
0015 %  NOTE
0016 %
0017 %    This function is provided for convenience. It simply calls <a href="matlab:help Map">Map</a>
0018 %    using the same parameters. See this function for details about optional parameters.
0019 %
0020 %  OUTPUT
0021 %
0022 %    The outputs are the same as for <a href="matlab:help Map">Map</a>, except for map.z which is replaced by:
0023 %
0024 %    map.phase       average phase map (in radians)
0025 %
0026 %  SEE
0027 %
0028 %    See also Map, MapStats, FiringCurve, FiringMap, PlotColorMap.
0029 
0030 % Copyright (C) 2009-2011 by Michaƫl Zugaro
0031 %
0032 % This program is free software; you can redistribute it and/or modify
0033 % it under the terms of the GNU General Public License as published by
0034 % the Free Software Foundation; either version 3 of the License, or
0035 % (at your option) any later version.
0036 
0037 % Check number of parameters
0038 if nargin < 2,
0039   error('Incorrect number of parameters (type ''help <a href="matlab:help PhaseMap">PhaseMap</a>'' for details).');
0040 end
0041 
0042 if size(samples,2) ~= 3,
0043   error('Parameter ''positions'' is not a Nx3 matrix (type ''help <a href="matlab:help PhaseMap''">PhaseMap''</a> for details).');
0044 end
0045 
0046 map = Map(positions,phases,'type','circular',varargin{:});
0047 map.phase = map.z;
0048 map = rmfield(map,'z');

Generated on Fri 16-Mar-2018 13:00:20 by m2html © 2005