Mercurial > hg > octave-nkf
annotate scripts/special-matrix/hadamard.m @ 15536:2e8eb9ac43a5 stable rc-3-6-4-0
3.6.4-rc0 release candidate
* configure.ac (AC_INIT): Version is now 3.6.2-rc0.
(OCTAVE_RELEASE_DATE): Now 2012-05-11.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 17 Oct 2012 10:05:44 -0400 |
parents | 72c96de7a403 |
children | f3d52523cde1 |
rev | line source |
---|---|
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
13913
diff
changeset
|
1 ## Copyright (C) 1993-2012 Paul Kienzle |
5827 | 2 ## |
3 ## This file is part of Octave. | |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
7016 | 7 ## the Free Software Foundation; either version 3 of the License, or (at |
8 ## your option) any later version. | |
5827 | 9 ## |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
14 ## | |
15 ## You should have received a copy of the GNU General Public License | |
7016 | 16 ## along with Octave; see the file COPYING. If not, see |
17 ## <http://www.gnu.org/licenses/>. | |
5827 | 18 ## |
19 ## Original version by Paul Kienzle distributed as free software in the | |
20 ## public domain. | |
21 | |
22 ## -*- texinfo -*- | |
23 ## @deftypefn {Function File} {} hadamard (@var{n}) | |
12639
4d777e05d47c
doc: Review and update documentation for "Matrix Manipulation" chapter.
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
24 ## Construct a Hadamard matrix (@nospell{Hn}) of size @var{n}-by-@var{n}. The |
4d777e05d47c
doc: Review and update documentation for "Matrix Manipulation" chapter.
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
25 ## size @var{n} must be of the form @math{2^k * p} in which |
4d777e05d47c
doc: Review and update documentation for "Matrix Manipulation" chapter.
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
26 ## p is one of 1, 12, 20 or 28. The returned matrix is normalized, |
4d777e05d47c
doc: Review and update documentation for "Matrix Manipulation" chapter.
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
27 ## meaning @w{@code{Hn(:,1) == 1}} and @w{@code{Hn(1,:) == 1}}. |
5827 | 28 ## |
29 ## Some of the properties of Hadamard matrices are: | |
30 ## | |
31 ## @itemize @bullet | |
32 ## @item | |
12639
4d777e05d47c
doc: Review and update documentation for "Matrix Manipulation" chapter.
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
33 ## @code{kron (Hm, Hn)} is a Hadamard matrix of size @var{m}-by-@var{n}. |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10791
diff
changeset
|
34 ## |
5827 | 35 ## @item |
12639
4d777e05d47c
doc: Review and update documentation for "Matrix Manipulation" chapter.
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
36 ## @code{Hn * Hn' = @var{n} * eye (@var{n})}. |
4d777e05d47c
doc: Review and update documentation for "Matrix Manipulation" chapter.
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
37 ## |
4d777e05d47c
doc: Review and update documentation for "Matrix Manipulation" chapter.
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
38 ## @item |
4d777e05d47c
doc: Review and update documentation for "Matrix Manipulation" chapter.
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
39 ## The rows of @nospell{Hn} are orthogonal. |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10791
diff
changeset
|
40 ## |
5827 | 41 ## @item |
12639
4d777e05d47c
doc: Review and update documentation for "Matrix Manipulation" chapter.
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
42 ## @code{det (@var{A}) <= abs (det (Hn))} for all @var{A} with |
4d777e05d47c
doc: Review and update documentation for "Matrix Manipulation" chapter.
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
43 ## @w{@code{abs (@var{A}(i, j)) <= 1}}. |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10791
diff
changeset
|
44 ## |
5827 | 45 ## @item |
12639
4d777e05d47c
doc: Review and update documentation for "Matrix Manipulation" chapter.
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
46 ## Multiplying any row or column by -1 and the matrix will remain a Hadamard |
4d777e05d47c
doc: Review and update documentation for "Matrix Manipulation" chapter.
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
47 ## matrix. |
5827 | 48 ## @end itemize |
12639
4d777e05d47c
doc: Review and update documentation for "Matrix Manipulation" chapter.
Rik <octave@nomad.inbox5.com>
parents:
11587
diff
changeset
|
49 ## @seealso{compan, hankel, toeplitz} |
5827 | 50 ## @end deftypefn |
51 | |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
52 |
5827 | 53 ## Reference [1] contains a list of Hadamard matrices up to n=256. |
54 ## See code for h28 in hadamard.m for an example of how to extend | |
55 ## this function for additional p. | |
56 ## | |
57 ## References: | |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
58 ## [1] A Library of Hadamard Matrices, N. J. A. Sloane |
5827 | 59 ## http://www.research.att.com/~njas/hadamard/ |
60 | |
61 function h = hadamard (n) | |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
62 |
5827 | 63 if (nargin != 1) |
64 print_usage (); | |
65 endif | |
66 | |
8507 | 67 ## Find k if n = 2^k*p. |
5827 | 68 k = 0; |
13893
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
69 while (n > 1 && fix (n/2) == n/2) |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
70 k++; |
13893
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
71 n /= 2; |
5827 | 72 endwhile |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
73 |
8507 | 74 ## Find base hadamard. |
75 ## Except for n=2^k, need a multiple of 4. | |
5827 | 76 if (n != 1) |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
77 k -= 2; |
5827 | 78 endif |
79 | |
8507 | 80 ## Trigger error if not a multiple of 4. |
5827 | 81 if (k < 0) |
82 n =- 1; | |
83 endif | |
84 | |
85 switch (n) | |
86 case 1 | |
87 h = 1; | |
88 case 3 | |
89 h = h12 (); | |
90 case 5 | |
91 h = h20 (); | |
92 case 7 | |
13913
521adfd775be
hadamard.m: Fix failing %!tests
Rik <octave@nomad.inbox5.com>
parents:
13893
diff
changeset
|
93 h = h28 (); |
5827 | 94 otherwise |
11472
1740012184f9
Use uppercase for variable names in error() strings to match Info documentation. Only m-files done.
Rik <octave@nomad.inbox5.com>
parents:
10821
diff
changeset
|
95 error ("hadamard: N must be 2^k*p, for p = 1, 12, 20 or 28"); |
5827 | 96 endswitch |
97 | |
8507 | 98 ## Build H(2^k*n) from kron(H(2^k),H(n)). |
5827 | 99 h2 = [1,1;1,-1]; |
100 while (true) | |
13893
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
101 if (fix (k/2) != k/2) |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
102 h = kron (h2, h); |
5827 | 103 endif |
13893
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
104 k = fix (k/2); |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
105 if (k == 0) |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
106 break; |
5827 | 107 endif |
108 h2 = kron (h2, h2); | |
109 endwhile | |
13893
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
110 |
5827 | 111 endfunction |
112 | |
113 function h = h12 () | |
8507 | 114 tu = [-1,+1,-1,+1,+1,+1,-1,-1,-1,+1,-1]; |
115 tl = [-1,-1,+1,-1,-1,-1,+1,+1,+1,-1,+1]; | |
116 ## Note: assert (tu(2:end), tl(end:-1:2)). | |
5827 | 117 h = ones (12); |
118 h(2:end,2:end) = toeplitz (tu, tl); | |
119 endfunction | |
120 | |
121 function h = h20 () | |
8507 | 122 tu = [+1,-1,-1,+1,+1,+1,+1,-1,+1,-1,+1,-1,-1,-1,-1,+1,+1,-1,-1]; |
123 tl = [+1,-1,-1,+1,+1,-1,-1,-1,-1,+1,-1,+1,-1,+1,+1,+1,+1,-1,-1]; | |
124 ## Note: assert (tu(2:end), tl(end:-1:2)). | |
5827 | 125 h = ones (20); |
126 h(2:end,2:end) = fliplr (toeplitz (tu, tl)); | |
127 endfunction | |
128 | |
129 function h = h28 () | |
130 ## Williamson matrix construction from | |
131 ## http://www.research.att.com/~njas/hadamard/had.28.will.txt | |
13893
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
132 ## Normalized so that each row and column starts with +1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
133 h = [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
134 1 1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 1 1 1 1 1 -1 1 1 1 1 -1 1 -1 1 -1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
135 1 -1 1 -1 -1 -1 -1 1 -1 1 1 -1 -1 1 -1 -1 -1 -1 1 1 -1 1 -1 1 1 1 1 1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
136 1 -1 -1 1 -1 -1 -1 1 1 1 1 1 -1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 1 -1 1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
137 1 -1 -1 -1 1 -1 -1 1 1 -1 1 1 1 1 1 -1 -1 -1 1 1 1 -1 1 -1 1 -1 -1 -1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
138 1 -1 -1 -1 -1 1 -1 1 1 -1 -1 1 1 -1 -1 -1 1 1 -1 -1 -1 1 1 1 1 1 1 -1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
139 1 -1 -1 -1 -1 -1 1 -1 1 -1 -1 -1 1 -1 1 1 1 -1 1 1 1 1 -1 1 -1 1 -1 1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
140 1 -1 1 1 1 1 -1 -1 1 -1 -1 -1 -1 1 1 1 -1 -1 -1 -1 1 -1 -1 1 1 1 1 -1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
141 1 -1 -1 1 1 1 1 1 -1 -1 -1 -1 -1 1 -1 -1 -1 1 -1 1 1 1 1 -1 -1 1 -1 1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
142 1 1 1 1 -1 -1 -1 -1 -1 -1 1 1 1 -1 1 -1 -1 -1 -1 -1 1 1 1 -1 -1 1 1 1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
143 1 -1 1 1 1 -1 -1 -1 -1 1 -1 1 1 -1 -1 -1 1 1 -1 1 1 -1 -1 1 1 -1 -1 1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
144 1 -1 -1 1 1 1 -1 -1 -1 1 1 -1 1 -1 -1 1 1 -1 1 1 -1 -1 1 -1 -1 1 1 -1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
145 1 -1 -1 -1 1 1 1 -1 -1 1 1 1 -1 -1 1 1 -1 -1 -1 -1 -1 1 1 1 1 -1 -1 1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
146 1 1 1 1 1 -1 -1 1 1 -1 -1 -1 -1 -1 -1 1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
147 1 1 -1 1 1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 -1 1 -1 1 -1 1 -1 -1 1 -1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
148 1 1 -1 1 -1 -1 1 -1 1 1 1 -1 -1 -1 -1 -1 -1 1 1 -1 1 -1 1 1 1 1 -1 -1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
149 1 1 -1 1 -1 1 1 1 1 1 -1 -1 1 -1 1 -1 -1 -1 -1 1 -1 -1 -1 -1 1 -1 1 1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
150 1 1 -1 1 -1 1 -1 1 -1 1 -1 1 1 1 -1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 -1 -1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
151 1 -1 1 -1 1 -1 1 1 1 1 1 -1 1 -1 -1 1 -1 1 -1 -1 1 1 -1 -1 -1 -1 1 -1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
152 1 1 1 -1 1 -1 1 1 -1 1 -1 -1 1 1 1 -1 1 -1 -1 -1 -1 -1 1 1 -1 1 -1 -1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
153 1 1 -1 -1 1 -1 1 -1 -1 -1 -1 1 1 1 -1 1 -1 1 1 -1 -1 -1 -1 -1 1 1 1 1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
154 1 1 1 -1 -1 1 1 1 -1 -1 1 1 -1 -1 -1 1 1 -1 -1 1 1 -1 -1 -1 1 1 -1 -1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
155 1 1 -1 -1 1 1 -1 1 -1 -1 1 -1 -1 -1 1 -1 1 1 1 -1 1 -1 -1 1 -1 -1 1 1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
156 1 -1 1 -1 -1 1 1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 -1 1 -1 1 -1 -1 -1 1 1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
157 1 1 1 -1 1 1 -1 -1 1 1 -1 1 -1 -1 1 -1 -1 1 1 1 -1 1 -1 -1 -1 1 -1 -1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
158 1 -1 1 1 -1 1 1 -1 -1 -1 1 -1 1 1 1 -1 1 1 1 -1 -1 1 -1 -1 1 -1 -1 -1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
159 1 1 1 -1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 1 -1 1 -1 -1 1 1 -1 -1 -1 1 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
160 1 -1 1 1 -1 -1 1 1 -1 -1 -1 1 -1 -1 1 1 -1 1 1 1 -1 -1 1 1 -1 -1 1 -1]; |
5827 | 161 endfunction |
162 | |
13893
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
163 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
164 %!assert (hadamard (1), 1) |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
165 %!assert (hadamard (2), [1,1;1,-1]) |
5827 | 166 %!test |
13893
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
167 %! for n = [1,2,4,8,12,24,48,20,28,2^9] |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
168 %! h = hadamard(n); |
13913
521adfd775be
hadamard.m: Fix failing %!tests
Rik <octave@nomad.inbox5.com>
parents:
13893
diff
changeset
|
169 %! assert (norm (h*h' - n*eye (n)), 0); |
13893
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
170 %! endfor |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
171 |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
172 %!error hadamard () |
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
173 %!error hadamard (1,2) |
13913
521adfd775be
hadamard.m: Fix failing %!tests
Rik <octave@nomad.inbox5.com>
parents:
13893
diff
changeset
|
174 %!error <N must be 2\^k\*p> hadamard (5) |
13893
5b1ddcf5ede1
hadamard.m: Embed hadamard28 matrix as constant rather than computed value.
Rik <octave@nomad.inbox5.com>
parents:
12639
diff
changeset
|
175 |