You are here: Symbol Reference > MtxVec Namespace > Classes > TMtx Class > public > Kron Method > TMtx.Kron Method (TVec, TVec)
MtxVec VCL
ContentsIndex
PreviousUpNext
TMtx.Kron Method (TVec, TVec)

The Kronecker product between two vectors.

Pascal
function Kron(const Vec1: TVec; const Vec2: TVec): TMtx; overload;

Calculates the Kronecker product between Vec1 and Vec2 and stores the result in the calling matrix. The Rows, Cols and TMtxVec.ComplexComplexproperties of calling matrix are set automatically.

var A: TMtx; V1,V2: TVec; begin CreateIt(A); CreateIt(V1,V2); try V1.SetIt(False,[1,2,3]); V2.SetIt(False,[4,5,6]); A.Kron(V1,V2); // A becomes: // [4 5 6] // [8 10 12] // [12 15 18] finally FreeIt(A); FreeIt(V1,V2); end; end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!