Reference Guide > R Routines > RMF Procedure
  

RMF Procedure
Reads data into a one- or two-dimensional matrix from specified file unit.
Usage
RMF, unit, a[, rows, columns]
Input Parameters
unit—File unit from which the input is taken.
rows—(optional) Number of rows in the matrix.
columns—(optional) Number of columns in the matrix.
Output Parameters
a—Named variable into which the data is stored.
Keywords
Complex—If present and nonzero, creates a single-precision complex matrix.
Dcomplex—If present and nonzero, creates a double-precision complex matrix.
Double—If present and nonzero, creates a double-precision matrix.
Format—Scalar string specifying the precise format of the data to be read. If Format is not specified, PV‑WAVE uses its default rules for formatting the input. The character string should start with a left parenthesis and end with a right parenthesis. For example:
Format = '(f10.5)'
Discussion
RMF is used to read data from a specified file unit into a matrix according to the PV‑WAVE matrix-storage mode. If rows and columns are not specified, RMF attempts to use the current definition of a to determine the number of rows and columns of a. If the arguments rows and columns are not specified and a is undefined or a scalar, an error is issued.
The matrix-printing procedures PM or PMF must be used to correctly print a matrix read in with RMF.
Example
This example reads in a 2-by-3 matrix from standard input (unit = –1) and prints the results using the matrix-printing procedure PM.
; Read the coefficient matrix.
; Read matrix.
RMF, 0, a, 2, 3
 11 22 33
 40 50 60
; Output the matrix.
PM, a
; PV-WAVE prints:
;   11.0000       22.0000       33.0000
;   40.0000       50.0000       60.0000
See Also
PM, PMF,   RM
See the PV‑WAVE Programmer’s Guide for more information.

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.