From: David B. <Dav...@mo...> - 2004-06-21 09:15:45
|
Try the attached patch. It works for all of the test cases you propose he= re. Just a stupid little bug it seems.. This patch is applied to the CVS Cheers David Dapr=E8s Quentin Spencer <qsp...@ie...> (le 18/06/2004): > OK, I tested your changes to the coding stuff and this is what I found: >=20 > bchpoly appears to give correct results for the cases I tested > cyclgen(255,bchpoly(255,247)) gives the correct result > cyclgen(255,bchpoly(255,239)) gives a matrix that is correct in the > first 8x8 submatrix, and zeros everywhere else !? > cyclpoly gives a vector containing all zeros for every input I tried. >=20 > Well, I guess there's at least some progress since one case worked. I'm > sorry the news isn't better. >=20 > -Quentin >=20 >=20 > David Bateman wrote: >=20 > >According to Quentin Spencer <qsp...@ie...> (on 06/16/04): > >=20 > > > >>David, > >> > >>Thanks. The updates fixed hammgen. However, now I've found another bu= g.=20 > >>I don't know if it was there all along or newly introduced. The=20 > >>following command should produce the 16x255 parity check matrix for a= =20 > >>BCH 2-error correcting code: > >>cyclgen(255,bchpoly(255,239)) > >> > >>The result instead is: > >>error: cyclgen: generator polynomial does not produce cyclic code > >> > >>I verified the resulting polynomial against MATLAB and they matched. > >> =20 > >> > > > >Ok, I'm a bit draft. The test I added checks if the polynomial is prim= itive > >rather than just irreducible. I'd previously tried to adapt this test = in > >the older code, but failed. > > > >So I went back to the basic implementation of dividing x^n-1 by the > >polynomial and checking that there was no remainder. It appears to > >work correctly for you test case now. Though maybe you want to give > >it a bit more testing.. Changes checked into the CVS > > > >Regards > >David > > > >=20 > > >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference > Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer > Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA > REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKN= D > _______________________________________________ > 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 |