PM Procedure
Outputs variables to the standard output stream (logical file unit –1).
Usage
PM, expr1, ..., exprn
Input Parameters
expri — Expression to be output.
Keywords
Format — If not specified, PV-WAVE uses its default rules for formatting the output. Keyword Format allows the format to be specified in precise detail, using FORTRAN-style specifications.
Title — If present, specifies a character string to be used as the title of the output matrix. Only one title is printed, regardless of the number of expressions sent to PM.
Discussion
PM is intended as an alternative to PRINT, especially for cases where the output variable is to be interpreted as a matrix in the mathematical sense, i.e., a 2D array whose first index is to be associated with its rows. Storage in memory is always the same, but PM prints a 2D array like a mathematical matrix, whereas PRINT prints its transpose (useful if the array is to be interpreted as an image).
By using keywords, the form of the output matrix can be customized. Keyword Title can be used to specify a character string to be used as a title. Keyword Format is provided to allow for explicitly formatted output.
Example 1
This example shows the results from multiplying a (2,3) matrix by a (3,4) matrix.
a = FINDGEN(2,3)  &  PM, a
; PV-WAVE prints:
;       0.00000       2.00000       4.00000
;       1.00000       3.00000       5.00000
b = FINDGEN(3,4)  &  PM, b
; PV-WAVE prints:
;       0.00000       3.00000       6.00000       9.00000
;       1.00000       4.00000       7.00000       10.0000
;       2.00000       5.00000       8.00000       11.0000
c = a # b         &  PM, c
; PV-WAVE prints:
;       10.0000       28.0000       46.0000       64.0000
;       13.0000       40.0000       67.0000       94.0000
Example 2
In this example, a 2-by-3 matrix is read using the matrix-reading procedure RM and the results are printed using the matrix-printing procedure PM.
; Read in a 2-by-3 matrix.
RM, a, 2, 3
; PV-WAVE prints:
;  row 0:
; Enter the following three numbers:
;  11 22 33
; PV-WAVE prints:
;  row 1:
; Enter the following three numbers:
;  40 50 60
PM, a
; PV-WAVE prints:
;  11.0000      22.0000      33.0000
;  40.0000      50.0000      60.0000
See Also
See the PV‑WAVE Programmer’s Guide for more information.