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

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

[Octave-bug-tracker] [bug #36665] ppval fails when pp.dim > 1 ans xi is


From: Marco Caliari
Subject: [Octave-bug-tracker] [bug #36665] ppval fails when pp.dim > 1 ans xi is an array
Date: Fri, 15 Jun 2012 07:18:03 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0

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

                 Summary: ppval fails when pp.dim > 1 ans xi is an array
                 Project: GNU Octave
            Submitted by: caliari
            Submitted on: Fri 15 Jun 2012 07:18:03 AM GMT
                Category: None
                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.6.0
        Operating System: GNU/Linux

    _______________________________________________________

Details:

Dear all,

consider the following


x = [0,1,2,3];
ppval (spline (x, [x;x]), x')

ans =

   0   1   2   3
   0   1   2   3


whereas


ppval (spline (x, [x;x]), [x',x'])
ans =

ans(:,:,1) =

   0   1   2   2
   0   2   2   3

ans(:,:,2) =

   0   1   2   2
   0   2   2   3


I think that ans(:,:,1) and ans(:,:,2) should be both equal to the previous
result (as in ml). I got the correct answer by replacing


dx = (xi - x(idx));
dx = repmat (dx, [prod(d), 1]);


with


dx = (xi - x(idx))(:);
dx = repmat (dx, [1, prod(d)])';


If you confirm this is the proper fix, I can submit a changeset.

Marco




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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