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

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

[Octave-bug-tracker] [bug #31536] demos for patch and isosurface fail


From: Rik
Subject: [Octave-bug-tracker] [bug #31536] demos for patch and isosurface fail
Date: Wed, 03 Nov 2010 19:31:15 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/9.10 (karmic) Firefox/3.6.12

Update of bug #31536 (project octave):

              Item Group:                    None => Incorrect Result       
                  Status:                    None => Confirmed              

    _______________________________________________________

Follow-up Comment #1:

Using 'hg bisect' I find the problem was introduced in this changeset:

changeset:   11160:131d56b6d9a3
user:        David Bateman <address@hidden>
date:        Thu Oct 28 01:56:14 2010 +0200
summary:     Set cdata from facevertexcdata and visa versa for patch at all
times

I've only briefly glanced at your patch.  We should definitely avoid indexing
into null arrays, which is what your patch does.  However it does it for only
2 of the 4 occurrences of this code construct.  Would it be better to do it
for all 4?  Also, the strcmp functions now work perfectly well on cell arrays
so I think the code could eliminate the anonymous function call for
legibility.  Sample below:

Original:
idx = find (cellfun (@(x) strcmpi (x, "facevertexcdata"), args))(end) + 1;
Proposed:
idx = find (cellfun (@(x) strcmpi (x, "facevertexcdata"), args), 1, "last") +
1;
My Suggestion:
idx = find (strcmpi (args, "facevertexcdata"), 1, "last") + 1;


Otherwise, the patch works for me.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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