15.11.2014 Views

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Matrices in <strong>MATLAB</strong><br />

returns an m-by-n rectangular identity matrix and eye(n) returns an n-by-n<br />

square identity matrix.<br />

The Kronecker Tensor Product<br />

The Kronecker product, kron(X,Y), <strong>of</strong> two matrices is the larger matrix formed<br />

from all possible products <strong>of</strong> the elements <strong>of</strong> X with those <strong>of</strong> Y. If X is m-by-n and<br />

Y is p-by-q, then kron(X,Y) is mp-by-nq. The elements are arranged in the<br />

following order:<br />

[X(1,1)*Y X(1,2)*Y . . . X(1,n)*Y<br />

. . .<br />

X(m,1)*Y X(m,2)*Y . . . X(m,n)*Y]<br />

The Kronecker product is <strong>of</strong>ten used with matrices <strong>of</strong> zeros and ones to build<br />

up repeated copies <strong>of</strong> small matrices. For example, if X is the 2-by-2 matrix<br />

X =<br />

1 2<br />

3 4<br />

and I = eye(2,2) is the 2-by-2 identity matrix, then the two matrices<br />

and<br />

are<br />

and<br />

kron(X,I)<br />

kron(I,X)<br />

1 0 2 0<br />

0 1 0 2<br />

3 0 4 0<br />

0 3 0 4<br />

1 2 0 0<br />

3 4 0 0<br />

0 0 1 2<br />

0 0 3 4<br />

1-11

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!