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.

922 MATRIX—END MATRIX<br />

**<br />

&*<br />

&/<br />

&**<br />

Matrix exponentiation. A matrix can be raised only to an integer power. The<br />

matrix, which must be square, is multiplied by itself as many times as the absolute<br />

value of the exponent. If the exponent is negative, the result is then inverted.<br />

Elementwise multiplication. Each element of the matrix is multiplied by the corresponding<br />

element of the second matrix. The matrices must have the same dimensions,<br />

or one must be a scalar.<br />

Elementwise division. Each element of the matrix is divided by the corresponding<br />

element of the second matrix. The matrices must have the same dimensions, or one<br />

must be a scalar.<br />

Elementwise exponentiation. Each element of the first matrix is raised to the power<br />

of the corresponding element of the second matrix. The matrices must have the<br />

same dimensions, or one must be a scalar.<br />

: Sequential integers. This operator creates a vector of consecutive integers from the<br />

value preceding the operator to the value following it. You can specify an optional<br />

increment following a second colon. See “Matrix Notation Shorthand” on p. 918<br />

for the principal use of this operator.<br />

• Use these operators only with numeric matrices. The results are undefined when they are<br />

used with string matrices.<br />

Relational Operators<br />

The relational operators are used to compare two matrices, element by element. The result is<br />

a matrix of the same size as the (expanded) operands and containing either 1 or 0. The value<br />

of each element, 1 or 0, is determined by whether the comparison between the corresponding<br />

element of the first matrix with the corresponding element of the second matrix is true or<br />

false, 1 for true and 0 for false. The matrices being compared must be of the same dimensions<br />

unless one of them is a scalar. The relational operators are listed in Table 1.<br />

Table 1 Relational operators in matrix programs<br />

> GT Greater than<br />

< LT Less than<br />

or ~= (¬=) NE Not equal to<br />

= GE Greater than or equal to<br />

= EQ Equal to<br />

• The symbolic and alphabetic forms of these operators are equivalent.<br />

• The symbols representing NE (~= or ¬ =) are system dependent. In general, the tilde (~)<br />

is valid for ASCII systems, while the logical-not sign ( ¬<br />

) , or whatever symbol is over the<br />

number 6 on the keyboard, is valid for IBM EBCDIC systems.<br />

• Use these operators only with numeric matrices. The results are undefined when they are<br />

used with string matrices.

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

Saved successfully!

Ooh no, something went wrong!