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

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

[Octave-bug-tracker] [bug #60967] interp1 returns wrong result when give


From: Hartmut
Subject: [Octave-bug-tracker] [bug #60967] interp1 returns wrong result when given both a method and an extrapval
Date: Sun, 25 Jul 2021 11:45:18 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0

URL:
  <https://savannah.gnu.org/bugs/?60967>

                 Summary: interp1 returns wrong result when given both a
method and an extrapval
                 Project: GNU Octave
            Submitted by: hardy
            Submitted on: Sun 25 Jul 2021 03:45:15 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 6.3.0
         Discussion Lock: Any
        Operating System: Any

    _______________________________________________________

Details:

I have observed this in Octave 6.3.0 (when trying to fix bug #60946).

When running the following code in Octave, I get an interpolation result that
I consider wrong in itself, and also not Matlab compatible:


result1 = interp1( [10, 6], [1, 1.5, 2], 'cubic')
result1_matlab = [10, 8, 6]  % -> works fine in Octave as well

result2 = interp1( [10, 6], [1, 1.5, 2], 'cubic', 0) 
result2_matlab = [10, 8, 6] %  -> gives NA in Octcave, why ???


I am trying to get a "cubic" interpolation (but any solution should work for
arbitrary interp methods) but also specify an extrapval value.

Is there an easy way to fix this in core Octave (or even a useful workaround)
so that I can go on with fixing bug #60946?




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60967>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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