Jump to content

Walsh matrix: Difference between revisions

m
Line 803:
<syntaxhighlight lang="jq">
## Generate a Walsh matrix of size 2^$n for $n >= 1
def walshMatrixwalsh:
. as $n
| [[1, 1], [1, -1]] as $w2
| if $n < 2 then $w2 else kprod($w2; $n - 1 | walshMatrixwalsh) end;
</syntaxhighlight>
<syntaxhighlight lang="jq">
2,479

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.