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.

SIZE Specification<br />

MATRIX—END MATRIX 943<br />

The SIZE specification is a matrix expression that, when evaluated, specifies the size of the<br />

matrix to be read.<br />

• The expression should evaluate to a two-element row or column vector. The first element<br />

designates the number of rows in the matrix to be read; the second element gives the number<br />

of columns.<br />

• Values of the SIZE specification are truncated to integers if necessary.<br />

• The size expression may be a constant, such as {5;5}, or a matrix variable name, such as<br />

MSIZE, or any valid expression, such as INFO(1,:).<br />

• If you use a scalar as the size expression, a column vector containing that number of rows<br />

is read. Thus, SIZE=1 reads a scalar, and SIZE=3 reads a 3 × 1 column vector.<br />

You must include a SIZE specification whenever you name an entire matrix (rather than a<br />

submatrix) on the READ statement. If you specify a submatrix, the SIZE specification is optional<br />

but, if included, must agree with the size of the specified submatrix.<br />

MODE Specification<br />

MODE specifies the format of the matrix to be read in. It can be either rectangular or symmetric.<br />

If the MODE specification is omitted, the default is RECTANGULAR.<br />

RECTANGULAR Matrix is completely represented in file. Each row begins on a new record,<br />

and all entries in that row are present on that and (possibly) succeeding<br />

records. This is the default if the MODE specification is omitted.<br />

SYMMETRIC Elements of the matrix below the main diagonal are the same as those above<br />

it. Only matrix elements on and below the main diagonal are read; elements<br />

above the diagonal are set equal to the corresponding symmetric elements<br />

below the diagonal. Each row is read beginning on a new record, although it<br />

may span more than one record. Only a single value is read from the first<br />

record, two values are read from the second, and so on.<br />

• If SYMMETRIC is specified, the matrix processor first checks that the number of rows and<br />

the number of columns are the same. If the numbers, specified either on SIZE or on the variable<br />

reference, are not the same, an error message is displayed and the command is not<br />

executed.<br />

REREAD Specification<br />

The REREAD specification indicates that the current READ statement should begin with the<br />

last record read by a previous READ statement.<br />

• REREAD has no further specifications.<br />

• REREAD cannot be used on the first READ statement to read from a file.<br />

• If you omit REREAD, the READ statement begins with the first record following the last one<br />

read by the previous READ statement.<br />

• The REREAD specification is ignored on the first READ statement following a call to the<br />

EOF function for the same file.

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

Saved successfully!

Ooh no, something went wrong!