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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

932 MATRIX—END MATRIX<br />

MOD(M,S) Remainders after division by a scalar. Takes two arguments, a matrix<br />

and a scalar (which must not be 0). Returns a matrix having the same<br />

dimensions as M, each of whose elements is the remainder after the<br />

corresponding element of M is divided by S. The sign of each element<br />

of the result is the same as the sign of the corresponding element of the<br />

matrix argument M.<br />

MSSQ(M) Matrix sum of squares. Takes a single argument. Returns a scalar that<br />

equals the sum of the squared values of all the elements in the argument.<br />

MSUM(M) Matrix sum. Takes a single argument. Returns a scalar that equals the<br />

sum of all of the elements in the argument.<br />

NCOL(M) Number of columns in a matrix. Takes a single argument. Returns a<br />

scalar that equals the number of columns in the argument.<br />

NROW(M) Number of rows in a matrix. Takes a single argument. Returns a scalar<br />

that equals the number of rows in the argument.<br />

RANK(M) Rank of a matrix. Takes a single argument. Returns a scalar that equals<br />

the number of linearly independent rows or columns in the argument.<br />

RESHAPE(M,S1,S2) Matrix of different dimensions. Takes three arguments, a matrix and<br />

two scalars, whose product must equal the number of elements in the<br />

matrix. Returns a matrix whose dimensions are given by the scalar<br />

arguments. For example, if M is any matrix with exactly 50 elements,<br />

then RESHAPE(M, 5, 10) is a matrix with 5 rows and 10 columns.<br />

Elements are assigned to the reshaped matrix in order by row.<br />

RMAX(M) Row maxima. Takes a single argument. Returns a column vector with<br />

the same number of rows as the argument. Each row of the result<br />

contains the maximum value of the corresponding row of the argument.<br />

RMIN(M) Row minima. Takes a single argument. Returns a column vector with<br />

the same number of rows as the argument. Each row of the result<br />

contains the minimum value of the corresponding row of the argument.<br />

RND(M) Elements rounded to the nearest integers. Takes a single argument.<br />

Returns a matrix having the same dimensions as the argument. Each<br />

element of the result equals the corresponding element of the argument<br />

rounded to an integer.<br />

RNKORDER(M) Ranking of matrix elements in ascending order. Takes a single argument.<br />

Returns a matrix having the same dimensions as the argument<br />

M. The smallest element of the argument corresponds to a result<br />

element of 1, and the largest element of the argument to a result<br />

element equal to the number of elements, except that ties (equal<br />

elements in M) are resolved by assigning a rank equal to the arithmetic

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

Saved successfully!

Ooh no, something went wrong!