[Top][All Lists]

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

[Octave-bug-tracker] [bug #63636] Cheby1 - imaginary residual in gain va

From: anonymous
Subject: [Octave-bug-tracker] [bug #63636] Cheby1 - imaginary residual in gain variable errors zp2tf
Date: Mon, 9 Jan 2023 16:04:37 -0500 (EST)


                 Summary: Cheby1 - imaginary residual in gain variable errors
                 Project: GNU Octave
               Submitter: None
               Submitted: Mon 09 Jan 2023 09:04:35 PM UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: gregory.white@ni.com
             Open/Closed: Open
                 Release: 7.1.0
         Discussion Lock: Any
        Operating System: Microsoft Windows
           Fixed Release: None
         Planned Release: None


Follow-up Comments:

Date: Mon 09 Jan 2023 09:04:35 PM UTC By: Anonymous
This is a simple problem, so I embedded the test file cheby1_gain_error.m:

function cheby1_gain_error
% cheby1_gain_error - shows complex residual in cheby1 gain causes error in
n = 5
rp = 10*log10(2)
[z,p,k] = cheb1ap(n,rp)
[num_lp, den_lp] = zp2tf(z, p, k)

% >> which cheby1
% 'cheby1' is a function from the file
% Line 115 is:
% gain = prod (-pole);
% Because of the method of computing "prod()", an imaginary residual is a 
% possible result for the real axis zero (n is odd).
% While careful construction of the roots and then the computation of gain 
% with those roots can avoid this, the brute force of enforcing real() upon 
% prod() is likely a sufficient solution. Use
% gain = real (prod (-pole));
% instead for line 115.

File Attachments:

Date: Mon 09 Jan 2023 09:04:35 PM UTC  Name: cheby1_gain_error.m  Size: 761B  
By: None



Reply to this item at:


Message sent via Savannah

reply via email to

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