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

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

[Octave-bug-tracker] [bug #43735] function interp1 behaves incorrectly


From: anonymous
Subject: [Octave-bug-tracker] [bug #43735] function interp1 behaves incorrectly
Date: Mon, 01 Dec 2014 23:28:19 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.101 Safari/537.36

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

                 Summary: function interp1 behaves incorrectly
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Mon 01 Dec 2014 11:28:18 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
         Discussion Lock: Any
                 Release: 3.8.2
        Operating System: GNU/Linux

    _______________________________________________________

Details:

When using octave version 3.8.2 interp1 results gives following results:


octave:1> interp1([0,1],[1,0],[0.1,0.9;0.2,1.1])
ans =

   0.90000   0.10000
   0.80000  -0.10000
   0.00000   0.00000
        NA        NA

octave:2>
octave:2> interp1([0,1],[1,0],[0.1,0.9;0.2,1.0])
ans =

   0.90000   0.10000
   0.80000   0.00000


Expected behaviour should be (in my opinion and as with version 3.4.3 and also
3.6.*)


octave:1> interp1([0,1],[1,0],[0.1,0.9;0.2,1.1])
ans =

   0.90000   0.10000
   0.80000        NA

octave:2> interp1([0,1],[1,0],[0.1,0.9;0.2,1.0])
ans =

   0.90000   0.10000
   0.80000   0.00000


I think that the bug is somewhere in file interp1.m:336. As yi is reshaped in
each method and not in the end of interp1 as previously yi(outliers, :) =
extrap will mess up yi because outliers and yi have different dimensions.





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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