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.

lfgui.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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 lfgui</title>
  6. <meta name="keywords" content="lfgui">
  7. <meta name="description" content="LFGUI M-file for lfgui.fig">
  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 m -->
  19. <h1>lfgui
  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>LFGUI M-file for lfgui.fig</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>function varargout = lfgui(varargin) </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"> LFGUI M-file for lfgui.fig
  27. LFGUI, by itself, creates a new LFGUI or raises the existing
  28. singleton*.
  29. H = LFGUI returns the handle to a new LFGUI or the handle to
  30. the existing singleton*.
  31. LFGUI('CALLBACK',hObject,eventData,handles,...) calls the local
  32. function named CALLBACK in LFGUI.M with the given input arguments.
  33. LFGUI('Property','Value',...) creates a new LFGUI or raises the
  34. existing singleton*. Starting from the left, property value pairs are
  35. applied to the GUI before lfgui_OpeningFunction gets called. An
  36. unrecognized property name or invalid value makes property application
  37. stop. All inputs are passed to lfgui_OpeningFcn via varargin.
  38. *See GUI Options on GUIDE's Tools menu. Choose &quot;GUI allows only one
  39. instance to run (singleton)&quot;.
  40. See also: GUIDE, GUIDATA, GUIHANDLES</pre></div>
  41. <!-- crossreference -->
  42. <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  43. This function calls:
  44. <ul style="list-style-image:url(../../../matlabicon.gif)">
  45. <li><a href="lfplot.html" class="code" title="function lfplot(varargin)">lfplot</a> Plot (for one or two dimensions) a locfit() fit.</li><li><a href="locfit.html" class="code" title="function fit=locfit(varargin)">locfit</a> Smoothing noisy data using Local Regression and Likelihood.</li></ul>
  46. This function is called by:
  47. <ul style="list-style-image:url(../../../matlabicon.gif)">
  48. </ul>
  49. <!-- crossreference -->
  50. <h2><a name="_subfunctions"></a>SUBFUNCTIONS <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  51. <ul style="list-style-image:url(../../../matlabicon.gif)">
  52. <li><a href="#_sub1" class="code">function lfgui_OpeningFcn(hObject, eventdata, handles, varargin)</a></li><li><a href="#_sub2" class="code">function varargout = lfgui_OutputFcn(hObject, eventdata, handles)</a></li><li><a href="#_sub3" class="code">function slider1_Callback(hObject, eventdata, handles)</a></li><li><a href="#_sub4" class="code">function slider1_CreateFcn(hObject, eventdata, handles)</a></li></ul>
  53. <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
  54. <div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function varargout = lfgui(varargin)</a>
  55. 0002 <span class="comment">% LFGUI M-file for lfgui.fig</span>
  56. 0003 <span class="comment">% LFGUI, by itself, creates a new LFGUI or raises the existing</span>
  57. 0004 <span class="comment">% singleton*.</span>
  58. 0005 <span class="comment">%</span>
  59. 0006 <span class="comment">% H = LFGUI returns the handle to a new LFGUI or the handle to</span>
  60. 0007 <span class="comment">% the existing singleton*.</span>
  61. 0008 <span class="comment">%</span>
  62. 0009 <span class="comment">% LFGUI('CALLBACK',hObject,eventData,handles,...) calls the local</span>
  63. 0010 <span class="comment">% function named CALLBACK in LFGUI.M with the given input arguments.</span>
  64. 0011 <span class="comment">%</span>
  65. 0012 <span class="comment">% LFGUI('Property','Value',...) creates a new LFGUI or raises the</span>
  66. 0013 <span class="comment">% existing singleton*. Starting from the left, property value pairs are</span>
  67. 0014 <span class="comment">% applied to the GUI before lfgui_OpeningFunction gets called. An</span>
  68. 0015 <span class="comment">% unrecognized property name or invalid value makes property application</span>
  69. 0016 <span class="comment">% stop. All inputs are passed to lfgui_OpeningFcn via varargin.</span>
  70. 0017 <span class="comment">%</span>
  71. 0018 <span class="comment">% *See GUI Options on GUIDE's Tools menu. Choose &quot;GUI allows only one</span>
  72. 0019 <span class="comment">% instance to run (singleton)&quot;.</span>
  73. 0020 <span class="comment">%</span>
  74. 0021 <span class="comment">% See also: GUIDE, GUIDATA, GUIHANDLES</span>
  75. 0022
  76. 0023 <span class="comment">% Copyright 2002-2003 The MathWorks, Inc.</span>
  77. 0024
  78. 0025 <span class="comment">% Edit the above text to modify the response to help lfgui</span>
  79. 0026
  80. 0027 <span class="comment">% Last Modified by GUIDE v2.5 27-Dec-2005 18:56:48</span>
  81. 0028
  82. 0029 <span class="comment">% Begin initialization code - DO NOT EDIT</span>
  83. 0030 gui_Singleton = 1;
  84. 0031 gui_State = struct(<span class="string">'gui_Name'</span>, mfilename, <span class="keyword">...</span>
  85. 0032 <span class="string">'gui_Singleton'</span>, gui_Singleton, <span class="keyword">...</span>
  86. 0033 <span class="string">'gui_OpeningFcn'</span>, @<a href="#_sub1" class="code" title="subfunction lfgui_OpeningFcn(hObject, eventdata, handles, varargin)">lfgui_OpeningFcn</a>, <span class="keyword">...</span>
  87. 0034 <span class="string">'gui_OutputFcn'</span>, @<a href="#_sub2" class="code" title="subfunction varargout = lfgui_OutputFcn(hObject, eventdata, handles)">lfgui_OutputFcn</a>, <span class="keyword">...</span>
  88. 0035 <span class="string">'gui_LayoutFcn'</span>, [] , <span class="keyword">...</span>
  89. 0036 <span class="string">'gui_Callback'</span>, []);
  90. 0037 <span class="keyword">if</span> nargin &amp;&amp; ischar(varargin{1})
  91. 0038 gui_State.gui_Callback = str2func(varargin{1});
  92. 0039 <span class="keyword">end</span>
  93. 0040
  94. 0041 <span class="keyword">if</span> nargout
  95. 0042 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
  96. 0043 <span class="keyword">else</span>
  97. 0044 gui_mainfcn(gui_State, varargin{:});
  98. 0045 <span class="keyword">end</span>
  99. 0046 <span class="comment">% End initialization code - DO NOT EDIT</span>
  100. 0047
  101. 0048
  102. 0049 <span class="comment">% --- Executes just before lfgui is made visible.</span>
  103. 0050 <a name="_sub1" href="#_subfunctions" class="code">function lfgui_OpeningFcn(hObject, eventdata, handles, varargin)</a>
  104. 0051 <span class="comment">% This function has no output args, see OutputFcn.</span>
  105. 0052 <span class="comment">% hObject handle to figure</span>
  106. 0053 <span class="comment">% eventdata reserved - to be defined in a future version of MATLAB</span>
  107. 0054 <span class="comment">% handles structure with handles and user data (see GUIDATA)</span>
  108. 0055 <span class="comment">% varargin command line arguments to lfgui (see VARARGIN)</span>
  109. 0056
  110. 0057 fit = <a href="locfit.html" class="code" title="function fit=locfit(varargin)">locfit</a>(varargin{:});
  111. 0058 <a href="lfplot.html" class="code" title="function lfplot(varargin)">lfplot</a>(fit);
  112. 0059 handles.lfargs = varargin;
  113. 0060
  114. 0061 <span class="comment">% Choose default command line output for lfgui</span>
  115. 0062 handles.output = hObject;
  116. 0063
  117. 0064 <span class="comment">% Update handles structure</span>
  118. 0065 guidata(hObject, handles);
  119. 0066
  120. 0067 <span class="comment">% UIWAIT makes lfgui wait for user response (see UIRESUME)</span>
  121. 0068 <span class="comment">% uiwait(handles.figure1);</span>
  122. 0069
  123. 0070
  124. 0071 <span class="comment">% --- Outputs from this function are returned to the command line.</span>
  125. 0072 <a name="_sub2" href="#_subfunctions" class="code">function varargout = lfgui_OutputFcn(hObject, eventdata, handles) </a>
  126. 0073 <span class="comment">% varargout cell array for returning output args (see VARARGOUT);</span>
  127. 0074 <span class="comment">% hObject handle to figure</span>
  128. 0075 <span class="comment">% eventdata reserved - to be defined in a future version of MATLAB</span>
  129. 0076 <span class="comment">% handles structure with handles and user data (see GUIDATA)</span>
  130. 0077
  131. 0078 <span class="comment">% Get default command line output from handles structure</span>
  132. 0079 varargout{1} = handles.output;
  133. 0080
  134. 0081
  135. 0082 <span class="comment">% --- Executes on slider movement.</span>
  136. 0083 <a name="_sub3" href="#_subfunctions" class="code">function slider1_Callback(hObject, eventdata, handles)</a>
  137. 0084 <span class="comment">% hObject handle to slider1 (see GCBO)</span>
  138. 0085 <span class="comment">% eventdata reserved - to be defined in a future version of MATLAB</span>
  139. 0086 <span class="comment">% handles structure with handles and user data (see GUIDATA)</span>
  140. 0087
  141. 0088 <span class="comment">% Hints: get(hObject,'Value') returns position of slider</span>
  142. 0089 <span class="comment">% get(hObject,'Min') and get(hObject,'Max') to determine range of slider</span>
  143. 0090
  144. 0091 n = get(hObject,<span class="string">'Value'</span>);
  145. 0092 n0 = get(hObject,<span class="string">'Min'</span>);
  146. 0093 n1 = get(hObject,<span class="string">'Max'</span>);
  147. 0094 nn = 0.1+(n-n0)/(n1-n0);
  148. 0095 fit = <a href="locfit.html" class="code" title="function fit=locfit(varargin)">locfit</a>(handles.lfargs{:},<span class="string">'nn'</span>,nn);
  149. 0096 <a href="lfplot.html" class="code" title="function lfplot(varargin)">lfplot</a>(fit);
  150. 0097
  151. 0098 <span class="comment">% --- Executes during object creation, after setting all properties.</span>
  152. 0099 <a name="_sub4" href="#_subfunctions" class="code">function slider1_CreateFcn(hObject, eventdata, handles)</a>
  153. 0100 <span class="comment">% hObject handle to slider1 (see GCBO)</span>
  154. 0101 <span class="comment">% eventdata reserved - to be defined in a future version of MATLAB</span>
  155. 0102 <span class="comment">% handles empty - handles not created until after all CreateFcns called</span>
  156. 0103
  157. 0104 <span class="comment">% Hint: slider controls usually have a light gray background, change</span>
  158. 0105 <span class="comment">% 'usewhitebg' to 0 to use default. See ISPC and COMPUTER.</span>
  159. 0106 usewhitebg = 1;
  160. 0107 <span class="keyword">if</span> usewhitebg
  161. 0108 set(hObject,<span class="string">'BackgroundColor'</span>,[.9 .9 .9]);
  162. 0109 <span class="keyword">else</span>
  163. 0110 set(hObject,<span class="string">'BackgroundColor'</span>,get(0,<span class="string">'defaultUicontrolBackgroundColor'</span>));
  164. 0111 <span class="keyword">end</span>
  165. 0112
  166. 0113</pre></div>
  167. <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>
  168. </body>
  169. </html>