bugGNU Octave - Bugs: bug #41448, ppval returns wrong dimensions for...

 
 

bug #41448: ppval returns wrong dimensions for scalar valued polynomial

Submitted by:  Markus Appel <mappel>
Submitted on:  Mon 03 Feb 2014 08:10:44 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.8.0Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 03 Feb 2014 11:21:52 PM UTC, comment #3:

Hard to say why it was commented out. I only know that it passes the regression tests with or without the block of code. But without it it fails the example in this bug report so it seems better to have it in.

Rik <rik5>
Project Administrator
Mon 03 Feb 2014 10:37:31 PM UTC, comment #2:

That block of code was apparently commented out when it was added in this changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/59e2460acae1

The purpose of that changeset was to make things more compatible, so I'm not sure why it was left out. Maybe Kai found some case where this behavior is not correct?

John W. Eaton <jwe>
Project Administrator
Mon 03 Feb 2014 10:25:39 PM UTC, comment #1:

Confirmed.

The function ppval is located in scripts/polynomial/ppval.m. At the bottom of the function just before returning the result to the user I see this

If I uncomment this section of code then I get the correct shape. I'm not sure why this happened, but I made the fix by uncommenting out the code. I also added a built-in self test for this so it won't happen again. The fix was made on the stable branch (http://hg.savannah.gnu.org/hgweb/octave/rev/90568d7fe382) and will be a part of the 3.8.1 bug fix release.

Rik <rik5>
Project Administrator
Mon 03 Feb 2014 08:10:44 PM UTC, original submission:

YI = ppval (PP, XI) is documented with:
"If PP describes a scalar polynomial function, the result is an array of the same shape as XI."

But:

I would the result expect to be a 3x3 matrix, i.e. :

I checked in Matlab R2012b, there the function ppval returns a 3x3 matrix as documented.

Markus Appel <mappel>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by mappel (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 03 Feb 2014 10:25:39 PM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1