octave-maintainers
[Top][All Lists]
Advanced

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

Fwd: [bug #30616] isosurface fails with 2 input arguments (wrong meshgri


From: Martin Helm
Subject: Fwd: [bug #30616] isosurface fails with 2 input arguments (wrong meshgrid creation)
Date: Sun, 1 Aug 2010 14:15:52 +0200
User-agent: KMail/1.12.4 (Linux/2.6.31.12-0.2-desktop; KDE/4.3.5; x86_64; ; )

Dear maintainers,

I am not completely sure about the current correct workflow for submitting a 
bug (and proposing a fix).
I received a bug report from an user and created an entry #30616 in the 
savannah tracker. the proposed patch is attached to that report.

Regards
Martin

----------  Weitergeleitete Nachricht  ----------

Betreff: [bug #30616] isosurface fails with 2 input arguments (wrong meshgrid 
creation)
Datum: Sonntag, 1. August 2010
Von: Martin Helm <address@hidden>
An: Martin Helm <address@hidden>, address@hidden


URL:
  <http://savannah.gnu.org/bugs/?30616>

                 Summary: isosurface fails with 2 input arguments (wrong
meshgrid creation)
                 Project: GNU Octave
            Submitted by: martinh
            Submitted on: So 01 Aug 2010 11:41:19 GMT
                Category: Interpreter
                Severity: 3 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.3.51
        Operating System: GNU/Linux

    _______________________________________________________

Details:

Received the following description from Andrew Lund:

> Hi, I'm not entirely sure if this is a bug or not, but lines 133-134 in
> isosurface.m read:
> 
>     [n1, n2, n3] = size (val);
>     [x, y, z] = meshgrid (1:n1, 1:n2, 1:n3);
> 
> when I think they should read:
> 
>     [n1, n2, n3] = size (val);
>     [x, y, z] = meshgrid (*1:n2, 1:n1*, 1:n3);
> 
> meshgrid considers x to be columns and y to be rows, opposite of what
>  matrix indices use. This came up because I tried to use FV =
>  isosurface(z,iso), and kept getting an error from marching cube
>  complaining xx, yy, zz and c are not equal sizes.
> 
> I don't know if there is another place to submit bug reports, but I
figured
> since you wrote it, you could figure it out.
> 
> Please let me know if this is a bug or not,
> 
> Andrew
> 
I can confirm that this is really a bug and should be

    [n2, n1, n3] = size (val);
    [x, y, z] = meshgrid (1:n1, 1:n2, 1:n3);

Can be reproduced by invoking

X = rand(10, 20, 30);
isosurface(X, 0.5);

Changeset attached.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: So 01 Aug 2010 11:41:19 GMT  Name: isosurface.diff  Size: 878B   By:
martinh

<http://savannah.gnu.org/bugs/download.php?file_id=21119>

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.gnu.org/


-------------------------------------------------------------

Attachment: isosurface.diff
Description: Text Data


reply via email to

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