Walsh matrix: Difference between revisions

m
Add some links, clarifications
(New draft task and Raku example)
 
m (Add some links, clarifications)
Line 3:
 
 
A '''Walsh matrix''' is a specific square matrix of dimensions 2<sup>''n''</sup>, where ''n'' is some particular natural number. The cellselements of the matrix are either '''+1''' or '''−1''' and its rows as well as columns are orthogonal, ''i.e. dot product is zero''. Each row of a Walsh matrix corresponds to a Walsh function.
 
Walsh matrices are a special case of Hadamard matrices. The ''naturally ordered'' Hadamard (Walsh) matrix is defined by the recursive formula below, and the ''sequency-ordered'' Hadamard (Walsh) matrix is formed by rearranging the rows so that the number of sign changes in a row is in increasing order.
Line 38:
;* Write a routine that, given a natural number '''k''', returns a '''naturally ordered''' Walsh matrix of order 2<sup>''k''</sup>.
;* Display a few sample generated matrices.
::''Traditionally, Walsh matrices use '''1''' & '''-1''' to denote the different cell values in text mode, or '''redgreen''' and '''greenred''' blocks in image mode. You may use whichever display mode is most convenient for your particular language.''
 
 
;Stretch
;* Also, optionally generate '''sequency ordered''' Walsh matrices.
::''A sequency ordered Walsh matrix has the rows sorted by number of sign changes.''
 
 
;See also
;* [[wp:Walsh_matrix|Wikipedia: Walsh matrix]]
;* [[Kronecker product|Related task: Kronecker product]]
 
 
10,327

edits