[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #44930] signal/zplane.m shows non-existent pol
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #44930] signal/zplane.m shows non-existent poles and zeros |
Date: |
Sun, 26 Apr 2015 14:40:49 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?44930>
Summary: signal/zplane.m shows non-existent poles and zeros
Project: GNU Octave
Submitted by: None
Submitted on: Sun 26 Apr 2015 14:40:47 UTC
Category: Octave Forge Package
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Robert Jenssen
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 4.0.0-rc3
Operating System: GNU/Linux
_______________________________________________________
Details:
zplane() is a pole/zero plotter from the signal-1.3.1 package. I sometimes
want to plot the zeros of a single polynomial, not a transfer function. For
example, zplane([1 2 3]) plots a pole at the origin implying a factor of
1/(z^(-1)-0). The example of a transfer function, H(z), is incorrect. The two
transfer functions shown on the right of the "="s are not equal. They differ
by a power of z^(-1).
Also the "N-M" or "M-N" triggers the "Octave:neg-dim-as-zero" warning.
Here is a diff showing my proposed change to the Octave code in
signal/zplane.m:
$diff -U 3 /usr/local/share/octave/packages/signal-1.3.1/zplane.m zplane.m
--- /usr/local/share/octave/packages/signal-1.3.1/zplane.m 2015-04-25
13:43:13.250880797 +1000
+++ zplane.m 2015-04-27 00:13:59.679500075 +1000
@@ -70,10 +70,8 @@
if isempty(z), z=1; endif
if isempty(p), p=1; endif
- M = length(z) - 1;
- N = length(p) - 1;
- z = [ roots(z); zeros(N - M, 1) ];
- p = [ roots(p); zeros(M - N, 1) ];
+ z=roots(z);
+ p=roots(p);
endif
endif
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?44930>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #44930] signal/zplane.m shows non-existent poles and zeros,
anonymous <=