From bug-octave-request at bevo dot che dot wisc dot edu Mon Apr 7 16:04:26 2003 Subject: It really is a bug in 2.1.46 (Was: Bug#187427: Bug in __bodquist__.m) From: "John W. Eaton" To: Dirk Eddelbuettel Cc: Mirek Kwasniak , 187427@bugs.debian.org, bug-octave@bevo.che.wisc.edu Date: Mon, 7 Apr 2003 16:03:07 -0500 On 5-Apr-2003, Dirk Eddelbuettel wrote: | On Sat, Apr 05, 2003 at 07:30:47PM +0200, Mirek Kwasniak wrote: | > On Sat, Apr 05, 2003 at 09:50:42AM -0600, Dirk Eddelbuettel wrote: | > [...] | > > On Thu, Apr 03, 2003 at 09:35:39AM -0000, sacrificial-spam-address at horizon dot com wrote: | > > > Package: octave2.1 | > > > Version: 2.1.46-3 | > > > | > > > John W. Easton wrote: | > > > >| octave:1> bode(zp2sys([],[1,2],1)) | > > > >| error: logspace: arguments must be scalars | > > > >| error: evaluating if command near line 71, column 5 | > > > >| error: evaluating if command near line 68, column 3 | > > > >| error: called from `logspace' in file | > > > >| `/usr/share/octave/2.1.35/m/general/logspace.m' | > > > >| error: called from `__bodquist__' in file | > > > >| `/usr/share/octave/2.1.35/m/control/base/__bodquist__.m' | > > > >| error: called from `bode' in file | > > > >| `/usr/share/octave/2.1.35/m/control/base/bode.m' | > > > > | > > > > This problem seems to be fixed in 2.1.39. | > > > | > > > It appears to be broken again in 2.1.46 (Debian binary package 2.1.46-3): | > > > | > > > GNU Octave, version 2.1.46 (i386-pc-linux-gnu). | > [...] | > | > > Actually, could you please double check that your installation is fine? | > > It works just dandily on my system: | > > | > > edd at chibud:~> octave2.1 | > > GNU Octave, version 2.1.43 (i386-pc-linux-gnu). | > ^^^^^^ | > | > Dirk, do you have 2.1.43? Bug is against 2.1.46-3 deb :) | | Oh boy, I was obviously lacking coffee ... I checked this on my testing | machine knowing full well that I built more recently on unstable. Hence the | version skew. | | And you are of course correct in that this fails. | | And it would appear that the culprit is not in the .m files as the /entire/ | control section is unchanged: | | edd at chibud:~> diff -ru /usr/share/octave/2.1.43/m/control/ \ | /var/local/unstable/usr/share/octave/2.1.46/m/control/ | edd at chibud:~> | | So it must be due to some changes in the parse. At which point I usually | turn to John -- any idea at your end? | | Dirk | | > [...] | > | > > Or could this may be a side-effect of me having octave-forge installed? | > > | > > Please follow-up with additional information, or I'll have to close the bug | > > report for apparent lack of reproducibility. | > | > It's not octave-forge forge problem (I have it). | > I think it's a problem in lines 105-112 in __bodquist__.m: | > 105: pdbig = vec(find(pd > dphase)); | > ^^^^ | > 110: fdbig = vec(find(fd > fm/10)); | > ^^^ | > 112: bigpts = union(fdbig, pdbig); | > | > What is purpouse doing column vector? union works fine for rows. | > Then we have a runtime error because in line: | > | > 127: for ii=bigpts | > | > we get ii as column :( I made the following changes. Thanks, jwe scripts/ChangeLog: 2003-04-07 John W. Eaton * control/base/__bodquist__.m: Don't convert pdbig and fdbig to column vectors. Index: control/base/__bodquist__.m =================================================================== RCS file: /usr/local/cvsroot/octave/scripts/control/base/__bodquist__.m,v retrieving revision 1.6 diff -u -r1.6 __bodquist__.m --- control/base/__bodquist__.m 9 Aug 2002 18:58:13 -0000 1.6 +++ control/base/__bodquist__.m 7 Apr 2003 21:01:48 -0000 at @ -102,12 +102,12 @@ dmag = 0.2; # desired max change in magnitude while(pcnt) pd = abs(diff(phase)); # phase variation - pdbig = vec(find(pd > dphase)); + pdbig = find(pd > dphase); lp = length(f); lp1 = lp-1; # relative variation fd = abs(diff(f)); fm = max(abs([f(1:lp1); f(2:lp)])); - fdbig = vec(find(fd > fm/10)); + fdbig = find(fd > fm/10); bigpts = union(fdbig, pdbig); ------------------------------------------------------------- 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 -------------------------------------------------------------