Help for this page

Select Code to Download


  1. or download this
    A = [ 1 2 ]
        [ 3 4 ]
    ...
            [  7  8 14 16 ]
            [ 15 18 20 24 ]
            [ 21 24 28 32 ]
    
  2. or download this
    #!/usr/bin/perl
    use strict;
    use warnings;
    ...
        }
        return $kron;
    }
    
  3. or download this
    [ 1 2 ]
    [ 3 4 ]
    
  4. or download this
    [ 1 1 ]   [ 2 2 ]
    [ 1 1 ]   [ 2 2 ]
    
    [ 3 3 ]   [ 4 4 ]
    [ 3 3 ]   [ 4 4 ]
    
  5. or download this
    [  5  6 ] [ 10 12 ]
    [  7  8 ] [ 14 16 ]
    
    [ 15 18 ] [ 20 24 ]
    [ 21 24 ] [ 28 32 ]
    
  6. or download this
    sub kronecker_product {
        my ($x, $y) = @_;
    ...
            $y * $x->dummy(0, $y0)->dummy(1, $y1)
        )->xchg(1, 2)->reshape($x0 * $y0, $x1 * $y1)
    }