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

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

[Octave-bug-tracker] [bug #41186] image: fspecial disk is not matlab com


From: Carnë Draug
Subject: [Octave-bug-tracker] [bug #41186] image: fspecial disk is not matlab compatible
Date: Fri, 28 Feb 2014 17:42:33 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20140207 Firefox/24.0 Iceweasel/24.3.0

Follow-up Comment #2, bug #41186 (project octave):

There are two things that should be avoided here:

1) avoid nested subfunctions. Instead, create a subfunction at the end of the
file (or if the function is really small, create a function handle).

2) avoid loops. These are not good for performance.

Since it seems you are a GSoC canditate trying to get used to Octave
development, I will also suggest some other smaller things:

1) add a test block for this feature. These are the %! blocks at the end of
many m files. fspecial does not have them yet but take a look at bwmorph or
imcomplement for examples.

2) add a note to the documentation of fspecial() about what the "disk" option.
This needs to be documented somewhere.

3) add a note to the NEWS file about this change (note that for a new user,
this is just a bug fix but someone using Octave for a long time, this is a
backwards incompatible change).

4) some comment on the code about what is going on. The comment for the
attachment "Each cell is weighted according to how much of it is covered by
the disk" is the most useful, why was it not in the actual code or even in the
commit message?

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41186>

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




reply via email to

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