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

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

[Octave-bug-tracker] [bug #61340] [octave forge] (splines) csaps produce


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #61340] [octave forge] (splines) csaps produces nonconformant arguments error for valid input
Date: Fri, 15 Oct 2021 11:30:54 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36

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

                 Summary: [octave forge] (splines) csaps produces
nonconformant arguments error for valid input
                 Project: GNU Octave
            Submitted by: nrjank
            Submitted on: Fri 15 Oct 2021 11:30:52 AM EDT
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: Nicholas Jankowski
        Originator Email: 
             Open/Closed: Open
                 Release: 6.3.0
         Discussion Lock: Any
        Operating System: Any

    _______________________________________________________

Details:

One of the matlab example scripts for the csaps function throws a
nonconformant argument error when run in Octave 6.3.0, splines 1.3.4:

2nd example from https://www.mathworks.com/help/curvefit/csaps.html


x = linspace(0,2*pi,21); y = sin(x)+(rand(1,21)-.5)*.3;
pp = csaps(x,y,0.4,[],[ones(1,10),repmat(5,1,10), 0]);
pp1 = csaps(x,y, [.4,ones(1,10),repmat(.2,1,10)], [], ...
                    [ones(1,10), repmat(5,1,10), 0]);
x = linspace(0,2*pi,21); y = sin(x)+(rand(1,21)-.5)*.3;
pp = csaps(x,y,0.4,[],[ones(1,10),repmat(5,1,10), 0]);
pp1 = csaps(x,y, [.4,ones(1,10),repmat(.2,1,10)], [], [ones(1,10),
repmat(5,1,10), 0]);
figure
hold on
fnplt(pp, 'b'); 
fnplt(pp1,'r--')
plot(x,y,'ok')
hold off
ylim([-1.5 1.5])
title(['Cubic smoothing spline, with right half treated differently'])
legend('pp Larger error weight', 'pp1 Larger error and smaller roughness
weight')

results in the attached figure comparing pp to pp1

in Octave, I get:

pkg load splines
x = linspace(0,2*pi,21); y = sin(x)+(rand(1,21)-.5)*.3;
pp = csaps(x,y,0.4,[],[ones(1,10),repmat(5,1,10), 0]);
pp1 = csaps(x,y, [.4,ones(1,10),repmat(.2,1,10)], [], ...
                    [ones(1,10), repmat(5,1,10), 0]);

error: operator *: nonconformant arguments (op1 is 1x21, op2 is 19x21)
error: called from
    csaps at line 108 column 5







    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fri 15 Oct 2021 11:30:52 AM EDT  Name: matlabCSAPS.png  Size: 19KiB  
By: nrjank

<http://savannah.gnu.org/bugs/download.php?file_id=52102>

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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