From: David B. <Dav...@mo...> - 2004-09-23 16:56:38
|
There is a problem in interp1 where if the fifth argument is not defined it is given the value NaN. strcmp is then called as strcmp(NaN, "extrap") which as of 2.1.59 is not valid... Are there other places this occurs? Should I fix it or would you like to do it Paul? This is a rather nasty bug with the latest versions of octave and octave-forge, so does it imply a rapid release being needed? Cheers David -- David Bateman Dav...@mo... Motorola CRM +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) 91193 Gif-Sur-Yvette FRANCE The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary |
From: David B. <Dav...@mo...> - 2004-09-23 17:01:09
|
Ok, I take it back... Its not a bug in octave-forge, but should be considered a bug in 2.1.59 as in matlab R12 I get strcmp(NaN, 'test') ans =3D 0 >> strcmp(1,1) ans =3D 0 So numeric arguments are acceptable to matlab and always return false... D. Dapr=E8s David Bateman <Dav...@mo...> (le 23/09/2004): > There is a problem in interp1 where if the fifth argument is not > defined it is given the value NaN. strcmp is then called as >=20 > strcmp(NaN, "extrap") >=20 > which as of 2.1.59 is not valid... Are there other places this occurs? > Should I fix it or would you like to do it Paul? This is a rather nasty > bug with the latest versions of octave and octave-forge, so does it imp= ly > a rapid release being needed? >=20 > Cheers > David >=20 >=20 > --=20 > David Bateman Dav...@mo... > Motorola CRM +33 1 69 35 48 04 (Ph)=20 > Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax)=20 > 91193 Gif-Sur-Yvette FRANCE >=20 > The information contained in this communication has been classified as:= =20 >=20 > [x] General Business Information=20 > [ ] Motorola Internal Use Only=20 > [ ] Motorola Confidential Proprietary >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Octave-dev mailing list > Oct...@li... > https://lists.sourceforge.net/lists/listinfo/octave-dev --=20 David Bateman Dav...@mo... Motorola CRM +33 1 69 35 48 04 (Ph)=20 Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax)=20 91193 Gif-Sur-Yvette FRANCE The information contained in this communication has been classified as:=20 [x] General Business Information=20 [ ] Motorola Internal Use Only=20 [ ] Motorola Confidential Proprietary |
From: John W. E. <jw...@be...> - 2004-09-23 17:28:01
|
On 23-Sep-2004, David Bateman <Dav...@mo...> wrote: | Ok, I take it back... Its not a bug in octave-forge, but should be | considered a bug in 2.1.59 as in matlab R12 I get | | strcmp(NaN, 'test') | | ans = | | 0 | | >> strcmp(1,1) | | ans = | | 0 | | | So numeric arguments are acceptable to matlab and always return | false... How about the following change then? jwe scripts/ChangeLog: 2004-09-23 John W. Eaton <jw...@oc...> * strings/strcmp.m: If args are not strings or cell arrays of strings, return zero instead of reporting an error. Index: scripts/strings/strcmp.m =================================================================== RCS file: /usr/local/cvsroot/octave/scripts/strings/strcmp.m,v retrieving revision 1.24 diff -u -r1.24 strcmp.m --- a/scripts/strings/strcmp.m 15 Sep 2004 18:28:56 -0000 1.24 +++ b/scripts/strings/strcmp.m 23 Sep 2004 17:25:20 -0000 @@ -139,11 +139,7 @@ else error ("strcmp: nonconformant cell arrays"); endif - else - error ("strcmp: expecting args to be strings or cell arrays of strings"); endif - else - error ("strcmp: expecting args to be strings or cell arrays of strings"); endif endfunction |