bugGNU Octave - Bugs: bug #31733, error: ppval: expects a pp...

 
 

bug #31733: error: ppval: expects a pp structure

Submitter:  Rick T <ratulloch>
Submitted:  Mon 22 Nov 2010 08:21:01 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Rick Tulloch Open/Closed:  * Closed
Release:  * 3.2.3 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 22 Nov 2010 09:49:10 PM UTC, comment #1: 

Use 'help ppval' to get this


-- Function File: YI = ppval (PP, XI)
     Evaluate piece-wise polynomial PP at the points XI.


So, you need to reverse your argument list.

yy=ppval(p1,xx);


Matlab uses the same convention so I'm not sure what it was actually calculating.  It would be better for Matlab to throw an error as well if the function is not used correctly.

Rik <rik5>
Group administrator
Mon 22 Nov 2010 08:21:01 PM UTC, original submission:  

error: ppval: expects a pp structure

Greetings All
I run a simple script to test piecewise in matlab and octave
It works in matlab

clear,clc
tic
coefs=[3,-5,1;0,3,-2];
breaks=[0 5 10];
p1=mkpp(breaks,coefs);
xx=linspace(-3,12);
yy=ppval(xx,p1);
plot(xx,yy);

But when the same script is run in octave 3.2.3 I get this error
error: ppval: expects a pp structure
error: called from:
error:   /usr/share/octave/3.2.3/m/polynomial/ppval.m at line 34, column 5

Does anyone have a work around?

aloha

Rick T <ratulloch>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by ratulloch (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-11-22 rik5 StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code