1 ## Copyright (C) 2007 Muthiah Annamalai <muthiah.annamalai@uta.edu>
3 ## This program is free software; you can redistribute it and/or modify it under
4 ## the terms of the GNU General Public License as published by the Free Software
5 ## Foundation; either version 3 of the License, or (at your option) any later
8 ## This program is distributed in the hope that it will be useful, but WITHOUT
9 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 ## You should have received a copy of the GNU General Public License along with
14 ## this program; if not, see <http://www.gnu.org/licenses/>.
17 ## @deftypefn {Function File} {} egolaygen ()
19 ## Returns the Extended Golay code (24,12) generator matrix,
20 ## which can correct upto 3 errors. The second argument is the partiy
21 ## check matrix, for this code.
24 ## @seealso{egolaydec,egolayenc}
26 function [G,P]=egolaygen()
28 P=[1 0 0 0 1 1 1 0 1 1 0 1;
29 0 0 0 1 1 1 0 1 1 0 1 1;
30 0 0 1 1 1 0 1 1 0 1 0 1;
31 0 1 1 1 0 1 1 0 1 0 0 1;
32 1 1 1 0 1 1 0 1 0 0 0 1;
33 1 1 0 1 1 0 1 0 0 0 1 1;
34 1 0 1 1 0 1 0 0 0 1 1 1;
35 0 1 1 0 1 0 0 0 1 1 1 1;
36 1 1 0 1 0 0 0 1 1 1 0 1;
37 1 0 1 0 0 0 1 1 1 0 1 1;
38 0 1 0 0 0 1 1 1 0 1 1 1;
39 1 1 1 1 1 1 1 1 1 1 1 0;];