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

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

[Octave-patch-tracker] [patch #8506] Add the taylorwin function to the s


From: Mike Miller
Subject: [Octave-patch-tracker] [patch #8506] Add the taylorwin function to the signal package.
Date: Sun, 17 Aug 2014 19:47:44 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36

Update of patch #8506 (project octave):

                  Status:                    None => In Progress            
             Assigned to:                    None => mtmiller               

    _______________________________________________________

Follow-up Comment #1:

Thanks for your contribution to Octave! This function can definitely be added
to the signal package. Would you mind looking at some coding style fixups and
adding unit tests?

It would be best for all new functions added to the signal package to adhere
to GNU Octave coding style conventions. Here are some suggestions based on a
quick review of your submission:

* Use 2 spaces for indentation
* Remove trailing spaces from all lines
* Use endfunction instead of end
* Omit brackets for single return values
* Use space before opening parenthesis on function calls, if, switch, etc, no
space when indexing
* For loops: use parentheses on initializers, omit ":1:" for default case of a
step-by-one iteration
* Keep parentheses on function calls with no arguments (e.g. print_usage ())
* Use "## " for function and in-code comments
* Make sure to indicate the function name in error messages

Some simple particulars about this function:

* Just error if the length argument is not a positive integer, refer to other
window functions in the signal package for example argument error checking,
for example
https://hg.mtmxr.com/octave-signal/file/817a7a769729/inst/chebwin.m
* Use m for the length argument to be consistent with other window functions
in the package
* Prefer lower case variable and inner function names, unless you want to
differentiate matrices from scalars using uppercase local variable names

And add test cases if you can, to verify that the function produces the
intended values and that it catches errors when given invalid input.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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