27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

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.

MATRIX—END MATRIX 931<br />

IDENT(S1 [,S2]) Create an identity matrix. Takes either one or two arguments, which<br />

must be scalars. Returns a matrix with as many rows as the first<br />

argument and as many columns as the second argument, if any. If the<br />

second argument is omitted, the result is a square matrix. Elements on<br />

the main diagonal of the result equal 1, and all other elements equal 0.<br />

INV(M) Inverse of a matrix. Takes a single argument, which must be square<br />

and nonsingular (that is, its determinant must not be 0). Returns a<br />

square matrix having the same dimensions as the argument. If A is the<br />

inverse of M, then M*A=A*M=I, where I is the identity matrix.<br />

KRONEKER(M1,M2) Kronecker product of two matrices. Takes two arguments. Returns a<br />

matrix whose row dimension is the product of the row dimensions of<br />

the arguments and whose column dimension is the product of the<br />

column dimensions of the arguments. The Kronecker product of two<br />

matrices A and B takes the form of an array of scalar products:<br />

A(1,1)*B A(1,2)*B ...A(1,N)*B<br />

A(2,1)*B<br />

...<br />

A(2,2)*B ...A(2,N)*B<br />

A(M,1)*B A(M,2)*B ...A(M,N)*B<br />

LG10(M) Base 10 logarithms of the elements. Takes a single argument, all of<br />

whose elements must be positive. Returns a matrix having the same<br />

dimensions as the argument, in which each element is the logarithm to<br />

base 10 of the corresponding element of the argument.<br />

LN(M) Natural logarithms of the elements. Takes a single argument, all of<br />

whose elements must be positive. Returns a matrix having the same<br />

dimensions as the argument, in which each element is the logarithm to<br />

base e of the corresponding element of the argument.<br />

MAGIC(S) Magic square. Takes a single scalar, which must be 3 or larger, as an<br />

argument. Returns a square matrix with S rows and S columns<br />

containing the integers from 1 through S . All the row sums and all the<br />

column sums are equal in the result matrix. (The result matrix is only<br />

one of several possible magic squares.)<br />

2<br />

MAKE(S1,S2,S3) Create a matrix, all of whose elements equal a specified value. Takes<br />

three scalars as arguments. Returns an S1 ×<br />

S2 matrix, all of whose<br />

elements equal S3.<br />

MDIAG(V) Create a square matrix with a specified main diagonal. Takes a single<br />

vector as an argument. Returns a square matrix with as many rows and<br />

columns as the dimension of the vector. The elements of the vector<br />

appear on the main diagonal of the matrix, and the other matrix<br />

elements are all 0.<br />

MMAX(M) Maximum element in a matrix. Takes a single argument. Returns a<br />

scalar equal to the numerically largest element in the argument M.<br />

MMIN(M) Minimum element in a matrix. Takes a single argument. Returns a<br />

scalar equal to the numerically smallest element in the argument M.

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

Saved successfully!

Ooh no, something went wrong!