[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #55098] wrong result from filtic when a(1) !=
From: |
Tony Richardson |
Subject: |
[Octave-bug-tracker] [bug #55098] wrong result from filtic when a(1) != 1 |
Date: |
Sun, 25 Nov 2018 13:55:44 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 |
URL:
<https://savannah.gnu.org/bugs/?55098>
Summary: wrong result from filtic when a(1) != 1
Project: GNU Octave
Submitted by: amrichardson
Submitted on: Sun 25 Nov 2018 06:55:42 PM UTC
Category: Octave Forge Package
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: 4.4.1
Operating System: Any
_______________________________________________________
Details:
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);
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55098>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #55098] wrong result from filtic when a(1) != 1,
Tony Richardson <=