Next: , Previous: spinv, Up: Function Reference


22.6.2.34 spkron

— Function File: spkron (a, b)

Form the kronecker product of two sparse matrices. This is defined block by block as

          x = [a(i, j) b]
     

For example,

          kron(speye(3),spdiag([1,2,3]))
          =>
          Compressed Column Sparse (rows = 9, cols = 9, nnz = 9)
          
            (1, 1) ->  1
            (2, 2) ->  2
            (3, 3) ->  3
            (4, 4) ->  1
            (5, 5) ->  2
            (6, 6) ->  3
            (7, 7) ->  1
            (8, 8) ->  2
            (9, 9) ->  3