bugGNU Octave - Bugs: bug #55098, [octave forge] (signal) wrong...

 
 

bug #55098: [octave forge] (signal) wrong result from filtic when a(1) != 1

Submitter:  Tony Richardson <amrichardson>
Submitted:  Sun 25 Nov 2018 06:55:42 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Duplicate Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.4.1 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 06 Dec 2018 07:40:39 PM UTC, comment #2: 

Thank you. This was actually reported a year ago by you. Can you please take a look at bug #52254 and post any further information there? Can you provide a patch against filtic.m that I can apply? Thanks.

Mike Miller <mtmiller>
Group Member
Sun 25 Nov 2018 07:51:19 PM UTC, comment #1: 

Sorry, the normalized example in the original post that is supposed to return the correct result should be:


>> filtic(1/2, [2 1]/2, 1)


and not


>> filtic(1/2, [2 1], 1)


Tony Richardson <amrichardson>
Sun 25 Nov 2018 06:55:42 PM UTC, original submission:  

The filtic function from the signal package gives incorrect results when the first element of the 'a' vector is not equal to 1.  Here is a simple example to illustrate the error:


>> filtic(1, [2 1], 1)
ans = -1


The correct result (and also the result returned by MATLAB) is -0.5.

Octave returns the correct result when the b and a vectors (the first two arguments to filtic) are normalized so that the first element of the a vector is 1:


>> filtic(1/2, [2 1], 1)
ans = -0.5000


Theoretically, the result should be the same regardless of the normalization.  That is filtic(1/anorm, [2 1]/anorm, 1) should return -0.5000 regardless of the value of anorm (MATLAB does this).

A simple fix is to divide the return vector (zf) by a(1) at the bottom (just before the endfunction line) of the filtic function:


zf = zf/a(1);



Tony Richardson <amrichardson>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by siko1056 (Updated the item)
  • -email is unavailable- added by amrichardson (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-12-06 mtmiller StatusNone Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #52254
    2018-11-28 siko1056 Summarywrong result from filtic when a(1) != 1 [octave forge] (signal) wrong result from filtic when a(1) != 1

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code