Home > FMAToolbox > Analyses > PhaseCurve.m

PhaseCurve

PURPOSE ^

PhaseCurve - Compute spatial phase curve.

SYNOPSIS ^

function map = PhaseCurve(samples,phases,varargin)

DESCRIPTION ^

PhaseCurve - Compute spatial phase curve.

  Compute phase curve, as well as occupancy and count curves.

  USAGE

    curve = PhaseCurve(samples,phases,<options>)

    samples        <a href="matlab:help samples">samples</a>, e.g. angles or linear positions across time
    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 curve.z which is replaced by:

    curve.phase       average phase curve (in radians)

  SEE

    See also PhaseMap, Map, MapStats, FiringCurve, FiringMap, PlotXY.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function map = PhaseCurve(samples,phases,varargin)
0002 
0003 %PhaseCurve - Compute spatial phase curve.
0004 %
0005 %  Compute phase curve, as well as occupancy and count curves.
0006 %
0007 %  USAGE
0008 %
0009 %    curve = PhaseCurve(samples,phases,<options>)
0010 %
0011 %    samples        <a href="matlab:help samples">samples</a>, e.g. angles or linear positions across time
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 curve.z which is replaced by:
0023 %
0024 %    curve.phase       average phase curve (in radians)
0025 %
0026 %  SEE
0027 %
0028 %    See also PhaseMap, Map, MapStats, FiringCurve, FiringMap, PlotXY.
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 PhaseCurve">PhaseCurve</a>'' for details).');
0040 end
0041 
0042 if ~isdmatrix(samples) | size(samples,2) ~= 2,
0043   error('Parameter ''samples'' is not a Nx2 matrix (type ''help <a href="matlab:help PhaseCurve">PhaseCurve</a>'' for details).');
0044 end
0045 
0046 map = Map(samples,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