[gnumeric] improve documentation of INTERPOLATION



commit 125f2f5cfd8a9db500a2ce48b0b35ae41c6d0a91
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Tue Jul 31 20:35:48 2012 -0600

    improve documentation of INTERPOLATION
    
    2012-07-31 Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* functions.c (help__interpolation): clarify description and
    	add examples
    
    2012-07-31  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* func.defs: update
    	* functions.xml: update

 doc/C/ChangeLog            |    5 +++++
 doc/C/func.defs            |   12 ++++++++++--
 doc/C/functions.xml        |   34 ++++++++++++++++++++++++++++++++--
 plugins/fn-tsa/ChangeLog   |    4 ++++
 plugins/fn-tsa/functions.c |    5 ++++-
 5 files changed, 55 insertions(+), 5 deletions(-)
---
diff --git a/doc/C/ChangeLog b/doc/C/ChangeLog
index 38776ed..b981bc2 100644
--- a/doc/C/ChangeLog
+++ b/doc/C/ChangeLog
@@ -1,3 +1,8 @@
+2012-07-31  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* func.defs: update
+	* functions.xml: update
+
 2012-07-30  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* figures/menu-data-export.png: new
diff --git a/doc/C/func.defs b/doc/C/func.defs
index 660bea6..a70c358 100644
--- a/doc/C/func.defs
+++ b/doc/C/func.defs
@@ -1402,6 +1402,14 @@ The depreciation coefficient used is:
 @SEEALSO=AMORDEGRC
 
 @CATEGORY=Finance
+ FUNCTION=ATL_LAST
+ SHORTDESC=sample real-time data source
+ SYNTAX=ATL_LAST(tag)
+ ARGUMENTDESCRIPTION=@{tag}: tag to watch
+ DESCRIPTION=ATL_LAST is a sample implementation of a real time data source.  It takes a string tag and monitors the named pipe ~/atl for changes to the value of that tag.
+ NOTE=This is not intended to be generally enabled and is OFF by default.
+
+ CATEGORY=Finance
 @FUNCTION=COUPDAYBS
 @SHORTDESC=number of days from coupon period to settlement
 @SYNTAX=COUPDAYBS(settlement,maturity,frequency,basis,eom)
@@ -6194,7 +6202,7 @@ The output consists of two columns of numbers, the first containing the trend co
 @FUNCTION=INTERPOLATION
 @SHORTDESC=interpolated values corresponding to the given abscissa targets
 @SYNTAX=INTERPOLATION(abscissae,ordinates,targets,interpolation)
- ARGUMENTDESCRIPTION=@{abscissae}: ordered abscissae of the given data points
+ ARGUMENTDESCRIPTION=@{abscissae}: abscissae of the given data points
 @{ordinates}: ordinates of the given data points
 @{targets}: abscissae of the interpolated data
 @{interpolation}: method of interpolation, defaults to 0 ('linear')
@@ -6206,7 +6214,7 @@ Possible interpolation methods are:
 3: staircase with averaging;
 4: natural cubic spline;
 5: natural cubic spline with averaging.
- NOTE=The @{abscissae} must be given in increasing order. If any of interpolation methods 1 ('linear with averaging'), 3 ('staircase with averaging'), and 5 ('natural cubic spline with averaging') is used, the number of returned values is one less than the number of targets and the targets values must be given in increasing order. Strings and empty cells in @{abscissae} and @{ordinates} are ignored. If several target data are provided they must be in the same column in consecutive cells.
+ NOTE=The @{abscissae} should be given in increasing order. If the @{abscissae} is not in increasing order the INTERPOLATION function is significantly slower. If any two @{abscissae} values are equal an error is returned. If any of interpolation methods 1 ('linear with averaging'), 3 ('staircase with averaging'), and 5 ('natural cubic spline with averaging') is used, the number of returned values is one less than the number of targets and the target values must be given in increasing order. The values returned are the average heights of the interpolation function on the intervals determined by consecutive target values. Strings and empty cells in @{abscissae} and @{ordinates} are ignored. If several target data are provided they must be in the same column in consecutive cells.
 @SEEALSO=PERIODOGRAM
 
 @CATEGORY=Time Series Analysis
diff --git a/doc/C/functions.xml b/doc/C/functions.xml
index 6335ad7..5c925c3 100644
--- a/doc/C/functions.xml
+++ b/doc/C/functions.xml
@@ -4861,6 +4861,36 @@
       </para>
       </refsect1>
     </refentry>
+    <refentry id="gnumeric-function-ATL_LAST">
+      <refmeta>
+        <refentrytitle>
+          <function>ATL_LAST</function>
+        </refentrytitle>
+      </refmeta>
+      <refnamediv>
+        <refname>
+          <function>ATL_LAST</function>
+        </refname>
+        <refpurpose>
+        sample real-time data source
+      </refpurpose>
+      </refnamediv>
+      <refsynopsisdiv>
+        <synopsis><function>ATL_LAST</function>(<parameter>tag</parameter>)</synopsis>
+      </refsynopsisdiv>
+      <refsect1>
+        <title>Arguments</title>
+        <para><parameter>tag</parameter>: tag to watch</para>
+      </refsect1>
+      <refsect1>
+        <title>Description</title>
+        <para><function>ATL_LAST</function> is a sample implementation of a real time data source.  It takes a string tag and monitors the named pipe ~/atl for changes to the value of that tag.</para>
+      </refsect1>
+      <refsect1>
+        <title>Note</title>
+        <para>This is not intended to be generally enabled and is OFF by default.</para>
+      </refsect1>
+    </refentry>
     <refentry id="gnumeric-function-COUPDAYBS">
       <refmeta>
         <refentrytitle>
@@ -21359,7 +21389,7 @@
       </refsynopsisdiv>
       <refsect1>
         <title>Arguments</title>
-        <para><parameter>abscissae</parameter>: ordered abscissae of the given data points</para>
+        <para><parameter>abscissae</parameter>: abscissae of the given data points</para>
         <para><parameter>ordinates</parameter>: ordinates of the given data points</para>
         <para><parameter>targets</parameter>: abscissae of the interpolated data</para>
         <para><parameter>interpolation</parameter>: method of interpolation, defaults to 0 ('linear')</para>
@@ -21377,7 +21407,7 @@
       </refsect1>
       <refsect1>
         <title>Note</title>
-        <para>The <parameter>abscissae</parameter> must be given in increasing order. If any of interpolation methods 1 ('linear with averaging'), 3 ('staircase with averaging'), and 5 ('natural cubic spline with averaging') is used, the number of returned values is one less than the number of targets and the targets values must be given in increasing order. Strings and empty cells in <parameter>abscissae</parameter> and <parameter>ordinates</parameter> are ignored. If several target data are provided they must be in the same column in consecutive cells.</para>
+        <para>The <parameter>abscissae</parameter> should be given in increasing order. If the <parameter>abscissae</parameter> is not in increasing order the <function>INTERPOLATION</function> function is significantly slower. If any two <parameter>abscissae</parameter> values are equal an error is returned. If any of interpolation methods 1 ('linear with averaging'), 3 ('staircase with averaging'), and 5 ('natural cubic spline with averaging') is used, the number of returned values is one less than the number of targets and the target values must be given in increasing order. The values returned are the average heights of the interpolation function on the intervals determined by consecutive target values. Strings and empty cells in <parameter>abscissae</parameter> and <parameter>ordinates</parameter> are ignored. If several target data are provided they must be in the same column in consecutive cells.</para>
       </refsect1>
       <refsect1>
         <title>See also</title>
diff --git a/plugins/fn-tsa/ChangeLog b/plugins/fn-tsa/ChangeLog
index 74dd7b4..5fc901e 100644
--- a/plugins/fn-tsa/ChangeLog
+++ b/plugins/fn-tsa/ChangeLog
@@ -1,3 +1,7 @@
+2012-07-31 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* functions.c (help__interpolation): clarify description and
+	add examples
 
 2012-07-31  Jean Brefort  <jean brefort normalesup org>
 
diff --git a/plugins/fn-tsa/functions.c b/plugins/fn-tsa/functions.c
index 8da15a1..36b20d8 100644
--- a/plugins/fn-tsa/functions.c
+++ b/plugins/fn-tsa/functions.c
@@ -393,9 +393,12 @@ static GnmFuncHelp const help_interpolation[] = {
 				 "averaging') is used, the number "
 				 "of returned values is one less than the number of targets and the target "
 				 "values must be given in increasing order. The values returned "
-				 "are the averages of the interpolation on each interval.") },
+				 "are the average heights of the interpolation function on the intervals "
+				 "determined by consecutive target values.") },
 	{ GNM_FUNC_HELP_NOTE, F_("Strings and empty cells in @{abscissae} and @{ordinates} are ignored.") },
 	{ GNM_FUNC_HELP_NOTE, F_("If several target data are provided they must be in the same column in consecutive cells.") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=interpolation(array(1,2,3),array(10,20,20),1.5,0)" },
+	{ GNM_FUNC_HELP_EXAMPLES, "=interpolation(array(1,2,3),array(10,20,20),array(1.5,4),1)" },
 	{ GNM_FUNC_HELP_SEEALSO, "PERIODOGRAM" },
 	{ GNM_FUNC_HELP_END, NULL }
 };



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]