bugGNU Octave - Bugs: bug #30295, interpN input validation needs...

 
 

bug #30295: interpN input validation needs improvement

Submitted by:  None
Submitted on:  Tue 29 Jun 2010 07:26:44 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Matěj TýčOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.4.2
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Mon 19 Sep 2011 12:31:35 PM UTC, comment #8:

Good suggestion!

I've pushed a change.

http://hg.savannah.gnu.org/hgweb/octave/rev/6b6d0e51bd2f

Ben Abbott <bpabbott>
Project Member
Mon 19 Sep 2011 03:01:25 AM UTC, comment #7:

My only comment would be to check for an integer using

One can use any of the chopping functions (fix, floor, ceil, round) for this test. I've benchmarked them all in prior work and fix() is the fastest. I'm trying to get this convention established in the Octave code rather than the "x == round (x)" which is ubiquitous in Matlab code.

Rik <rik5>
Project Administrator
Sun 18 Sep 2011 02:00:12 AM UTC, comment #6:

The last changeset is below.

http://hg.savannah.gnu.org/hgweb/octave/rev/e173fda06fca

I'll leave this open for testing.

Ben Abbott <bpabbott>
Project Member
Sat 17 Sep 2011 08:17:54 PM UTC, comment #5:

The problem with interp3 is trivial. The changeset is below.

http://hg.savannah.gnu.org/hgweb/octave/rev/621108cf81d1

The remaining problem is with interpn(). With Matlab ...

... and Octave ...

If the interleave factor is explicitly set to one, the result is still incorrect.

I'm changing the summary again to better represent the bug.

Ben Abbott <bpabbott>
Project Member
Sat 17 Sep 2011 07:24:19 PM UTC, comment #4:

I've pushed a change to fix the problem with interp2.

http://hg.savannah.gnu.org/hgweb/octave/rev/ab17591254fc

Ben Abbott <bpabbott>
Project Member
Sat 17 Sep 2011 05:34:33 PM UTC, comment #3:

I'm changing the release to 3.4.2 and modifying the summary to indicate both interp2 and interp3.

Ben Abbott <bpabbott>
Project Member
Sat 17 Sep 2011 05:32:59 PM UTC, comment #2:

Both bug #30121, and bug #29601 have been resolved. However, there remain some problems.

For example, with Matlab ...

... and with Octave ...

The 3D problems also persists. Matlab ...

... and Octave ...

Ben Abbott <bpabbott>
Project Member
Thu 01 Jul 2010 04:18:57 AM UTC, comment #1:

This is confirmed on a recent hg tip (10736:14af8004945d) running on GNU/Linux.

In general, all of the interp functions need to be reworked as evidenced by this bug, bug #30121, and bug #29601.

Rik <rik5>
Project Administrator
Tue 29 Jun 2010 07:26:44 PM UTC, original submission:

Hello,
I am quite sure that there is something wrong with arguments parsing in interp3 (it is, among other things, done in quite different way than in interp2)
In short, see the output:

octave:30> interp2(rand(2,2));
octave:31> interp3(rand(2,2,2));
error: subscript indices must be either positive integers or logicals.
error: called from:
error: /usr/share/octave/3.2.4/m/general/interp3.m at line 73, column 3
octave:32> interp3(rand(2,2,2), 'linear');
error: A(I): Index exceeds matrix dimension.
error: called from:
error: /usr/share/octave/3.2.4/m/general/interp3.m at line 91, column 7

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 27 Sep 2011 03:41:33 AM UTCrik5StatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Sun 18 Sep 2011 02:00:12 AM UTCbpabbottStatusConfirmed=>Ready For Test
    Sat 17 Sep 2011 08:17:54 PM UTCbpabbottSummaryinterp2 / interp3 input validation needs improvement=>interpN input validation needs improvement
    Sat 17 Sep 2011 05:34:33 PM UTCbpabbottRelease3.2.4=>3.4.2
      Summaryinterp3 input validation needs improvement=>interp2 / interp3 input validation needs improvement
    Thu 01 Jul 2010 04:18:57 AM UTCrik5StatusNone=>Confirmed
      Summaryinterp3 call fails=>interp3 input validation needs improvement

    Back to the top


    Powered by Savane 3.1-cleanup1