Kronecker product: Difference between revisions

Content added Content deleted
m (→‎{{header|Haskell}}: Minor rearrangement for fewer brackets)
m (→‎{{header|REXX}}: fixed two typos.)
Line 1,778: Line 1,778:
call makeMat 'A', aMat /*construct A matrix from elements.*/
call makeMat 'A', aMat /*construct A matrix from elements.*/
call makeMat 'B', bMat /* " B " " " */
call makeMat 'B', bMat /* " B " " " */
call KronMat 'Kronecker product' /*calculate the Kronecker produect. */
call KronMat 'Kronecker product' /*calculate the Kronecker product. */
w=0; say; say copies('░', 55); say /*display a fence between the 2 outputs*/
w=0; say; say copies('░', 55); say /*display a fence between the 2 outputs*/
aMat= 3x3 0 1 0 1 1 1 0 1 0 /*define A matrix size and elements.*/
aMat= 3x3 0 1 0 1 1 1 0 1 0 /*define A matrix size and elements.*/
Line 1,784: Line 1,784:
call makeMat 'A', aMat /*construct A matrix from elements.*/
call makeMat 'A', aMat /*construct A matrix from elements.*/
call makeMat 'B', bMat /* " B " " " */
call makeMat 'B', bMat /* " B " " " */
call KronMat 'Kronecker product' /*calculate the Kronecker produect. */
call KronMat 'Kronecker product' /*calculate the Kronecker product. */
exit /*stick a fork in it, we're all done. */
exit /*stick a fork in it, we're all done. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
/*──────────────────────────────────────────────────────────────────────────────────────*/