bugGNU Octave - Bugs: bug #52835, small patches for document Chapter...

 
 

bug #52835: small patches for document Chapter polynomial,interpolation,geometry

Submitter:  None
Submitted:  Mon 08 Jan 2018 12:21:07 PM UTC
   
 
Category:  Documentation Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.2.1
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 08 Jan 2018 08:27:04 PM UTC, comment #2: 

I checked in your changes here (http://hg.savannah.gnu.org/hgweb/octave/rev/1c1adf6ab75d).

I ended up re-writing the Geometry section on Barycentric coordinates because it was so confusing.  Likewise, I improved the language a bit for mkpp.m.

Rik <rik5>
Group administrator
Mon 08 Jan 2018 12:28:46 PM UTC, comment #1: 

Oh sorry, "P = sum(Beta .* T)" is not right. Only "P = Beta * T" is right, just as "tsearchn>cart2bary".

Anonymous
Mon 08 Jan 2018 12:21:07 PM UTC, original submission:  


diff -ur a/doc/interpreter/geometry.txi b/doc/interpreter/geometry.txi
--- a/doc/interpreter/geometry.txi
+++ b/doc/interpreter/geometry.txi
@@ -102,7 +102,7 @@

 @DOCSTRING(tetramesh)

-The difference between @code{triplot}, and @code{trimesh} or @code{triplot},
+The difference between @code{triplot}, and @code{trimesh} or @code{trisurf},
 is that the former only plots the 2-dimensional triangulation itself, whereas
 the second two plot the value of a function @code{f (@var{x}, @var{y})}.  An
 example of the use of the @code{triplot} function is
@@ -149,7 +149,7 @@
 coordinates defining the point @var{p} are given by

 @example
-@var{p} = sum (@var{beta}(1:@var{N}+1) * @var{t}(1:@var{N}+1),:)
+@var{p} = @var{beta}(1:@var{N}+1) * @var{t}(1:@var{N}+1, :)
 @end example

 @noindent
@@ -212,7 +212,7 @@
 @group
 @var{x} = [-1; -1; 1; 1];
 @var{y} = [-1; 1; -1; 1];
-@var{tri} = [1, 2, 3; 2, 3, 1];
+@var{tri} = [1, 2, 3; 2, 3, 4];
 @end group
 @end example

diff -ur a/scripts/general/interp2.m b/scripts/general/interp2.m
--- a/scripts/general/interp2.m
+++ b/scripts/general/interp2.m
@@ -71,7 +71,7 @@
 ## @end table
 ##
 ## @var{extrap} is a scalar number.  It replaces values beyond the endpoints
-## with @var{extrap}.  Note that if @var{extrapval} is used, @var{method} must
+## with @var{extrap}.  Note that if @var{extrap} is used, @var{method} must
 ## be specified as well.  If @var{extrap} is omitted and the @var{method} is
 ## @qcode{"spline"}, then the extrapolated values of the @qcode{"spline"} are
 ## used.  Otherwise the default @var{extrap} value for any other @var{method}
diff -ur a/scripts/polynomial/mkpp.m b/scripts/polynomial/mkpp.m
--- a/scripts/polynomial/mkpp.m
+++ b/scripts/polynomial/mkpp.m
@@ -38,7 +38,7 @@
 ## order is defined by the length of the last dimension of @var{coefs}.  The
 ## size of first dimension(s) are given by the scalar or vector @var{d}.  If
 ## @var{d} is not given it is set to @code{1}.  In any case @var{coefs} is
-## reshaped to a 2-D matrix of size @code{[@var{ni}*prod(@var{d} @var{m})]}.
+## reshaped to a 2-D matrix of size @code{[@var{ni}*prod(@var{d}) @var{m}]}.
 ##
 ## @seealso{unmkpp, ppval, spline, pchip, ppder, ppint, ppjumps}
 ## @end deftypefn


Note on Geometry:

First, the original expression has syntax error. Secondly, "P = sum(Beta T)" is wrong; either "P = Beta T" or "P = sum(Beta .* T)" is right. I refer to the subfunction "tsearchn>cart2bary".

Replace "tri = [1, 2, 3; 2, 3, 1];" with "tri = [1, 2, 3; 2, 3, 4];" according to the following result "tsearch (x, y, tri, 0.5, 0.5) ⇒ 2". If not so, "tsearch (x, y, tri, 0.5, 0.5) ⇒ NaN"

Note on interp2:

Only interp2 has the variable name inconsistence; interp1,interp3,interpn are OK.

Note on mkpp:

Of course the expression "[NI*prod(D M)]" has syntax error, but I'm not familiar with piecewise polynomial so I'm not very sure how to correct it, so please check whether the change above is correct.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-01-08 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code