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: Joonas Lipping
Subject: [Octave-bug-tracker] [bug #41186] image: fspecial disk is not matlab compatible
Date: Thu, 27 Feb 2014 22:49:23 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0

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

I am adding a comment to comply with the warning on the Short Projects wiki
page (for file #30710 below).

I have adjusted the fspecial function 'disk' case. In the (2R+1)x(2R+1) matrix
M that is returned, each element corresponds to a square of size 1 on a grid.
Let there be a disk of radius R centered in the *middle* of the square
corresponding to element m_{R+1,R+1}. Then m_{ij} = p_{ij}/A, where p_{ij} is
the fraction of the corresponding square that is covered by the disk and A =
pi R^2 is the total area of the square.

This appears to give the same values as Matlab's fspecial function, up to
"format long" accuracy.

    _______________________________________________________

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]