octave-patch-tracker
[Top][All Lists]
Advanced

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

[Octave-patch-tracker] [patch #9051] Octave Mapping package: Antipode


From: Philip Nienhuis
Subject: [Octave-patch-tracker] [patch #9051] Octave Mapping package: Antipode
Date: Mon, 18 Jul 2016 11:54:20 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0

Follow-up Comment #3, patch #9051 (project octave):

Thanks for a quick response!

I hope you want to improve it a bit more; I am hopeful because you were so
quick, and that is why I add so much comments below, to show you what kind of
quality we expect.

Trying "help antipode":

>> help antipode
'antipode' is a function from the file
D:\Octave\Octave-4.0.3_w64\share\octave\pac
kages\mapping-1.2.1\antipode.m

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.  This program is distributed in the hope that
it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.  You should have received a
copy of the GNU General Public License along with this program; see the
file COPYING. If not, see <http://www.gnu.org/licenses/>.  -*- texinfo
-*-

Additional help for built-in functions and operators is
available in the online version of the manual.  Use the command
'doc <topic>' to search the manual index.

Help and information about Octave is also available on the WWW
at http://www.octave.org and via the address@hidden
mailing list.


while a sibling antipode2.m, made by me by simply typing
edit antipode2.m
in the Octave terminal + copying over code + slight style editing, looks as
follows:

>> help antipode2
'antipode2' is a function from the file D:\Projecten\antipode2.m

 -- Function File: RETVAL = antipode2 (INPUT1, INPUT2)

     See also{????}

Additional help for built-in functions and operators is
available in the online version of the manual.  Use the command
'doc <topic>' to search the manual index.

Help and information about Octave is also available on the WWW
at http://www.octave.org and via the address@hidden
mailing list.
>>


==> the texinfo layout isn't OK.
Just do as I showed: in he Octave terminal type "edit antipode.m", please fill
in the copyright line + author line and if there are functions doing similar
transformations, add their names (w/o trailing .m) between the seealso
brackets, separated by commas, or if not: omit the seealso line.
Also take care of the syntax of the @deftypefn line, do mention all
arguments.

Input checking is required. Make sure input args are numeric and are within
accepted ranges. What about:

>> [la, lo] = antipode2 (-987.3, 400083)
la =  987.30
lo = -399903


That doesn't make sense, does it?

In addition (but I tend to be overasking) add a few tests. You can use e.g.,
the following example:

>> [la, lo] = antipode2 ([-34, 190], [187, -15])
la =
    34  -190
lo =
    -7   195
>> [la, lo] = antipode2 ([-34; 190], [187; -15])
la =
    34
  -190
lo =
    -7
   195


and error tests are needed.
See e.g., strread.m for how tests look like. Error tests make sure erroneous
input is catched.

To be able to credit you, please supply your name and email address. If you
don't want to it'll be credited to "anonymous" I suppose :-)


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?9051>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]