fig10_1.html 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 fig10_1</title>
  6. <meta name="keywords" content="fig10_1">
  7. <meta name="description" content="Local Regression and Likelihood, Figure 10.1.">
  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 Book -->
  19. <h1>fig10_1
  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 Regression and Likelihood, Figure 10.1.</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 Regression and Likelihood, Figure 10.1.
  27. uses 'module','allcf' rather than 'deriv',[1 1] to get the
  28. second derivative coefficient
  29. Author: Catherine Loader</pre></div>
  30. <!-- crossreference -->
  31. <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  32. This function calls:
  33. <ul style="list-style-image:url(../../../matlabicon.gif)">
  34. <li><a href="../../../chronux_2_10/locfit/m/lfknots.html" class="code" title="function z=lfknots(fit,varargin)">lfknots</a> </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>
  35. This function is called by:
  36. <ul style="list-style-image:url(../../../matlabicon.gif)">
  37. <li><a href="runbook.html" class="code" title="">runbook</a> </li></ul>
  38. <!-- crossreference -->
  39. <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  40. <div class="fragment"><pre>0001 <span class="comment">% Local Regression and Likelihood, Figure 10.1.</span>
  41. 0002 <span class="comment">%</span>
  42. 0003 <span class="comment">% uses 'module','allcf' rather than 'deriv',[1 1] to get the</span>
  43. 0004 <span class="comment">% second derivative coefficient</span>
  44. 0005 <span class="comment">%</span>
  45. 0006 <span class="comment">% Author: Catherine Loader</span>
  46. 0007
  47. 0008 load geyser;
  48. 0009 a = [0.5 0.75 1];
  49. 0010
  50. 0011 f=[<span class="string">'a'</span>,<span class="string">'b'</span>,<span class="string">'c'</span>,<span class="string">'d'</span>];
  51. 0012 <span class="keyword">for</span> (i=1:3)
  52. 0013 figure(<span class="string">'Name'</span>, sprintf( <span class="string">'figure10_1%c'</span>, f(i) ) );
  53. 0014
  54. 0015 fit = <a href="../../../chronux_2_10/locfit/m/locfit.html" class="code" title="function fit=locfit(varargin)">locfit</a>(geyser,<span class="string">'deg'</span>,2,<span class="string">'link'</span>,<span class="string">'ident'</span>,<span class="string">'kern'</span>,<span class="string">'gauss'</span>,<span class="string">'ev'</span>,<span class="string">'grid'</span>,<span class="string">'mg'</span>,501,<span class="string">'ll'</span>,1,<span class="string">'ur'</span>,6,<span class="string">'module'</span>,<span class="string">'allcf'</span>,<span class="string">'h'</span>,a(i));
  55. 0016 x = fit.fit_points.evaluation_points;
  56. 0017 y = <a href="../../../chronux_2_10/locfit/m/lfknots.html" class="code" title="function z=lfknots(fit,varargin)">lfknots</a>(fit);
  57. 0018 y = y(:,3);
  58. 0019 plot(x,y.^2);
  59. 0020 itgl = [0.5 ones(1,499) 0.5] * (y.^2) / 100
  60. 0021 <span class="keyword">end</span>;
  61. 0022</pre></div>
  62. <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>
  63. </body>
  64. </html>