Jump to content

Kronecker product: Difference between revisions

(Added Fōrmulæ solution)
Line 762:
[ 0 0 0 0 1 1 1 1 0 0 0 0 ]
</pre>
 
=={{header|BQN}}==
 
<lang bqn>KProd ← ∾·<⎉2 ×⌜</lang>
 
Example:
 
<lang bqn>l ← >⟨1‿2, 3‿4⟩
r ← >⟨0‿5, 6‿7⟩
 
l KProd r</lang>
 
<pre>
┌─
╵ 0 5 0 10
6 7 12 14
0 15 0 20
18 21 24 28
</pre>
 
([https://mlochbaum.github.io/BQN/try.html#code=S1Byb2Qg4oaQIOKIvsK3POKOiTLDl+KMnAoKbCDihpAgPuKfqDHigL8yLCAz4oC/NOKfqQpyIOKGkCA+4p+oMOKAvzUsIDbigL834p+pCgpsIEtQcm9kIHIK online REPL])
 
=={{header|C}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.