From bug-octave-request at bevo dot che dot wisc dot edu Mon Dec 15 23:10:00 2003 Subject: zp2sys and bode From: "John W. Eaton" To: Gabriele Pannocchia Cc: "Giovanni Visciano" , bug-octave@bevo.che.wisc.edu Date: Mon, 15 Dec 2003 23:09:47 -0600 On 15-Dec-2003, Gabriele Pannocchia wrote: | I think the error is generated by line 74 of zp2ss.m. | Here is my fix proposal. | | --- /usr/share/octave/2.1.50/m/control/system/zp2ss.m Mon Sep 22 18:06:43 2003 | +++ zp2ss.m Mon Dec 15 12:43:49 2003 | at @ -71,7 +71,7 @@ | warning("zp2ss: k is complex") | endif | | - zpsys = ss2sys([],[],[],k); | + zpsys = ss2sys(zeros(0,0),zeros(0,1),zeros(1,0),k); | | ## Find the number of zeros and the number of poles | nzer=length(zer); | | | | The reason for this fix is that a pure gain system (as it is meant to be | defined in line 74) should have 0 states but still 1 input and 1 output. Hence | its state-space matrices should be: | A = zeros(0,0); | B = zeros(0,1); | C = zeros(1,0); | D = k; I made this change in CVS. Thanks, jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------