bugGNU Octave - Bugs: bug #36351, interp2 run from high to low

 
 

bug #36351: interp2 run from high to low

Submitted by:  Grant Stephens <stephensg>
Submitted on:  Mon 30 Apr 2012 12:46:15 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: Ben Abbott <bpabbott>
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

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)

Wed 09 May 2012 03:43:41 AM UTC, comment #6:

It seems like the issue is fixed. I'm closing this report.

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Thu 03 May 2012 10:37:53 PM UTC, comment #5:

I pushed a modification of the changeset.

http://hg.savannah.gnu.org/hgweb/octave/rev/0d37fda09415

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Thu 03 May 2012 12:31:27 PM UTC, comment #4:

You are right, Matlab does not handle non-monotonic, too. So, your patch is correct to fix the bug, even if a more intelligent error message can be give.
Later I could try to handle the non-monotonic case.
But please push your patch to fix this bug.

Cheers,

Marco

Marco Caliari <caliari>
Project Member
Thu 03 May 2012 11:38:06 AM UTC, comment #3:

Good point on handling non-monotonic values.

Matlab will throw an error if x and/or y are not monotonic (i.e. all (diff (x) > 0) || all (diff (x) < 0))

My thought was to do the same ... although I now realize a more intelligent error message can be give.

Did you have something else in mind ?

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Thu 03 May 2012 06:55:36 AM UTC, comment #2:

Dear Ben,

does your path manage the case

that is, non-monotonic x? I didn't try, but I don't think so. Since in bicubic.m there is already a sort of x and xi (around line 113), I think that a proper fix should first of all sort x (not sure about xi).

Marco

Marco Caliari <caliari>
Project Member
Thu 03 May 2012 12:21:53 AM UTC, comment #1:

I've attached a changeset. If there are no concerns/comments, I'll push it.

(file #25769)

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Mon 30 Apr 2012 12:46:15 PM UTC, original submission:

The interp2 function does not work with meshgrid data that is arranged from high to low, as follows:

It does run in matlab and should be able to run in octave with minimal changes.

Grant Stephens <stephensg>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #25769:  changeset.patch added by bpabbott (3KiB - application/octet-stream)
file #25768:  changeset.patch added by bpabbott (3KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by caliari (Posted a comment)
  • -unavailable- added by bpabbott (Updated the item)
  • -unavailable- added by stephensg (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 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 09 May 2012 03:43:41 AM UTCjordighStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu 03 May 2012 10:37:53 PM UTCbpabbottStatusPatch Submitted=>Ready For Test
    Thu 03 May 2012 12:21:53 AM UTCbpabbottAttached File-=>Added changeset.patch, #25769
      Item GroupOther=>Matlab Compatibility
      StatusNone=>Patch Submitted
      Assigned toNone=>bpabbott
    Thu 03 May 2012 12:20:17 AM UTCbpabbottAttached File-=>Added changeset.patch, #25768
    Mon 30 Apr 2012 03:51:51 PM UTCstephensgCarbon-CopyRemoved -unavailable-=>-
    Mon 30 Apr 2012 12:46:15 PM UTCstephensgCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1