Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

lfex1.html 5.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/REC-html40/loose.dtd">
  3. <html>
  4. <head>
  5. <title>Description of lfex1</title>
  6. <meta name="keywords" content="lfex1">
  7. <meta name="description" content="Local Estimation a spike firing rate (in spikes per unit time).">
  8. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  9. <meta name="generator" content="m2html &copy; 2005 Guillaume Flandin">
  10. <meta name="robots" content="index, follow">
  11. <link type="text/css" rel="stylesheet" href="../../../m2html.css">
  12. <script type="text/javascript">
  13. if (top.frames.length == 0) { top.location = "../../../index.html"; };
  14. </script>
  15. </head>
  16. <body>
  17. <a name="_top"></a>
  18. <!-- ../../menu.html chronux_2_10 --><!-- # locfit --><!-- menu.html Neuro -->
  19. <h1>lfex1
  20. </h1>
  21. <h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  22. <div class="box"><strong>Local Estimation a spike firing rate (in spikes per unit time).</strong></div>
  23. <h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  24. <div class="box"><strong>This is a script file. </strong></div>
  25. <h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  26. <div class="fragment"><pre class="comment"> Local Estimation a spike firing rate (in spikes per unit time).
  27. The estimation procedure approximates the log of the spike firing
  28. rate by a quadratic polynomial, within a sliding window.
  29. The first argument to locfit() is a column vector of the spike times.
  30. 'family','rate' specifies that the output of the density estimate should
  31. be in terms of events per unit time. (instead of the default, statistical
  32. density estimation).
  33. 'alpha',0.6 specifies the width of the sliding windows, as a fraction of
  34. the total spikes.
  35. xlim gives the limits of the observation interval. Correct specification
  36. of this is critical to avoid introducing bias at end-points.
  37. The lfband(fit) line adds confidence bands (based on pointwise 95%
  38. coverage) to the plot.
  39. The spike time data is from Hemant Bokil.</pre></div>
  40. <!-- crossreference -->
  41. <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  42. This function calls:
  43. <ul style="list-style-image:url(../../../matlabicon.gif)">
  44. <li><a href="../../../chronux_2_10/locfit/m/lfband.html" class="code" title="function lfband(fit,varargin)">lfband</a> adds confidence bands around the plot of a locfit() fit.</li><li><a href="../../../chronux_2_10/locfit/m/lfplot.html" class="code" title="function lfplot(varargin)">lfplot</a> Plot (for one or two dimensions) a locfit() fit.</li><li><a href="../../../chronux_2_10/locfit/m/locfit.html" class="code" title="function fit=locfit(varargin)">locfit</a> Smoothing noisy data using Local Regression and Likelihood.</li></ul>
  45. This function is called by:
  46. <ul style="list-style-image:url(../../../matlabicon.gif)">
  47. </ul>
  48. <!-- crossreference -->
  49. <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  50. <div class="fragment"><pre>0001 <span class="comment">% Local Estimation a spike firing rate (in spikes per unit time).</span>
  51. 0002 <span class="comment">%</span>
  52. 0003 <span class="comment">% The estimation procedure approximates the log of the spike firing</span>
  53. 0004 <span class="comment">% rate by a quadratic polynomial, within a sliding window.</span>
  54. 0005 <span class="comment">%</span>
  55. 0006 <span class="comment">% The first argument to locfit() is a column vector of the spike times.</span>
  56. 0007 <span class="comment">% 'family','rate' specifies that the output of the density estimate should</span>
  57. 0008 <span class="comment">% be in terms of events per unit time. (instead of the default, statistical</span>
  58. 0009 <span class="comment">% density estimation).</span>
  59. 0010 <span class="comment">%</span>
  60. 0011 <span class="comment">% 'alpha',0.6 specifies the width of the sliding windows, as a fraction of</span>
  61. 0012 <span class="comment">% the total spikes.</span>
  62. 0013 <span class="comment">%</span>
  63. 0014 <span class="comment">% xlim gives the limits of the observation interval. Correct specification</span>
  64. 0015 <span class="comment">% of this is critical to avoid introducing bias at end-points.</span>
  65. 0016 <span class="comment">%</span>
  66. 0017 <span class="comment">% The lfband(fit) line adds confidence bands (based on pointwise 95%</span>
  67. 0018 <span class="comment">% coverage) to the plot.</span>
  68. 0019 <span class="comment">%</span>
  69. 0020 <span class="comment">% The spike time data is from Hemant Bokil.</span>
  70. 0021
  71. 0022 load lmem5312.mat;
  72. 0023 fit = <a href="../../../chronux_2_10/locfit/m/locfit.html" class="code" title="function fit=locfit(varargin)">locfit</a>(data(6).times{1},<span class="string">'xlim'</span>,[78.9 80.30],<span class="string">'family'</span>,<span class="string">'rate'</span>,<span class="string">'nn'</span>,0.6);
  73. 0024 <a href="../../../chronux_2_10/locfit/m/lfplot.html" class="code" title="function lfplot(varargin)">lfplot</a>(fit);
  74. 0025 title(<span class="string">'Spike Firing Rate Estimation'</span>);
  75. 0026 <a href="../../../chronux_2_10/locfit/m/lfband.html" class="code" title="function lfband(fit,varargin)">lfband</a>(fit);</pre></div>
  76. <hr><address>Generated on Fri 12-Aug-2011 11:36:15 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" target="_parent">m2html</a></strong> &copy; 2005</address>
  77. </body>
  78. </html>