READ MATRIX TO VARIABLES
Name:
Type:
Purpose:
Reads matrix data into a response variable, a row-id
variable, and a column-id variable.
Description:
The READ MATRIX command is used to read a data file
into a matrix. This is useful for utilizing the Dataplot
commands that explicitly work on matrices.
However, in some cases it may be more convenient to
read the matrix as a single response variable. For
example, you may want to use commands that work on variables
rather than matrices. In these cases, you can use the
READ MATRIX TO VARIABLES command instead of the READ MATRIX
command. This command will create row-id and column-id
variables in addition to the response variable.
Syntax:
READ MATRIX TO VARIABLES <file> <y> <rowid>
<colid>
where <file> is the name of the file that contains the matrix
data;
<y> is the response variable where the data will be
saved;
<rowid> is a variable that identifies the row of the
matrix for each response variable;
and <colid> is a variable that identifies the column of the
matrix for each response variable.
The <file> argument is optional. If it is omitted, Dataplot
will read the matrix data from the terminal rather than a file.
Examples:
READ MATRIX TO VARIABLES FILE.DAT Y ROW COL
Note:
By default, DATAPLOT does free format reads. However, it has the
capability for supporting FORTRAN style formats. Formatted reads
can be about 10 times faster on many systems. This can be helpful
for large data files. Enter HELP READ FORMAT for more details.
Note:
Blank lines in data files are ignored.
Note:
DATAPLOT supports the ability to embed comment lines within
the data file. Enter HELP COMMENT CHECK for details.
Note:
In order to determine whether the first argument is a file name or
a variable name, it looks for a period in the name. If it finds
one, it assumes a file name. If it does not, it assumes a variable
name. If your file name does not contain a period, attach a
trailing period (no spaces) to the file name on the
READ STACKED VARIABLES command.
Note:
DATAPLOT has no restrictions on the file name other than it be a
valid file name on the local operating system and that it contain
a period "." in the file name itself or as a trailing character.
DATAPLOT strips off trailing periods on those systems where it is
appropriate to do so. On systems where trailing periods can be a
valid file name (e.g., Unix), DATAPLOT tries to open the file with
the trailing period. If this fails, it then tries to open the file
with the trailing period stripped off.
Some users prefer to give all data files a ".DAT" or ".dat"
extension. Although this is a useful method for keeping track of
data files, it is strictly a user convention and is not enforced
by DATAPLOT in any way.
Note:
File names are case sensitive on Unix file systems. For Unix,
DATAPLOT attempts to open the file as given. If this fails, it
attempts to open the file as all upper case characters. If this
fails, it attempts to open the file as all lower case characters.
All other currently supported systems are not case sensitive
regarding file names.
As a further caution for Unix hosts, certain expansion characters
(specifically ~ to refer to your home directory) are interpreted
by the shell and are not recognized by the Fortran compiler. These
expansion characters are interpreted as literal characters and do
not yield the intended file name.
Default:
Synonyms:
Related Commands:
Applications:
Implementation Date:
Program:
READ MATRIX TO VARIABLES Y ROWID COLID
1 3 2
7 3 1
8 1 2
END OF DATA
PRINT Y ROWID COLID
The following output results for Y, ROWID and COLID:
1 1 1
3 1 2
2 1 3
7 2 1
3 2 2
1 2 3
8 3 1
1 3 2
2 3 3
Privacy
Policy/Security Notice
Disclaimer |
FOIA
NIST is an agency of the U.S.
Commerce Department.
Date created: 01/12/2009
Last updated: 11/04/2015
Please email comments on this WWW page to
[email protected].
|
|