x04cb prints a real matrix stored in a two-dimensional array.
Syntax
C# |
---|
public static void x04cb( string matrix, string diag, int m, int n, double[,] a, string form, string title, string labrow, string[] rlabs, string labcol, string[] clabs, int ncols, int indent, out int ifail ) |
Visual Basic |
---|
Public Shared Sub x04cb ( _ matrix As String, _ diag As String, _ m As Integer, _ n As Integer, _ a As Double(,), _ form As String, _ title As String, _ labrow As String, _ rlabs As String(), _ labcol As String, _ clabs As String(), _ ncols As Integer, _ indent As Integer, _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void x04cb( String^ matrix, String^ diag, int m, int n, array<double,2>^ a, String^ form, String^ title, String^ labrow, array<String^>^ rlabs, String^ labcol, array<String^>^ clabs, int ncols, int indent, [OutAttribute] int% ifail ) |
F# |
---|
static member x04cb : matrix : string * diag : string * m : int * n : int * a : float[,] * form : string * title : string * labrow : string * rlabs : string[] * labcol : string * clabs : string[] * ncols : int * indent : int * ifail : int byref -> unit |
Parameters
- matrix
- Type: System..::..StringOn entry: indicates the part of the matrix to be printed.
- The whole of the rectangular matrix.
- The lower triangle of the matrix, or the lower trapezium if the matrix has more rows than columns.
- The upper triangle of the matrix, or the upper trapezium if the matrix has more columns than rows.
Constraint: , or .
- diag
- Type: System..::..StringOn entry: unless , diag must specify whether the diagonal elements of the matrix are to be printed.
- The diagonal elements of the matrix are not referenced and not printed.
- The diagonal elements of the matrix are not referenced, but are assumed all to be unity, and are printed as such.
- The diagonal elements of the matrix are referenced and printed.
If , then diag need not be set.Constraint: if , , or .
- m
- Type: System..::..Int32
- n
- Type: System..::..Int32
- a
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, dim2]Note: dim1 must satisfy the constraint:Note: the second dimension of the array a must be at least .
- form
- Type: System..::..StringOn entry: describes the Fortran format code for printing the elements of the matrix a. The format code may be any allowed on the system, whether it is standard Fortran or not. It may or may not be enclosed in brackets.In addition, there are the following special codes which force x04cb to choose its own format code:
- x04cb will choose a format code such that numbers will be printed with an F8.4, an F11.4 or a 1PE13.4 format. The F8.4 code is chosen if the sizes of all the matrix elements to be printed lie between and . The F11.4 code is chosen if the sizes of all the matrix elements to be printed lie between and . Otherwise the 1PE13.4 code is chosen.
- x04cb will choose a format code such that numbers will be printed to as many significant digits as are necessary to distinguish between neighbouring machine numbers. Thus any two numbers that are stored with different internal representations should look different on output. Whether they do in fact look different will depend on the run-time library of the Fortran compiler in use.
By preceding the desired format code by the string ‘MATLAB’, x04cb will print the matrix such that it can be input into MATLAB, and title will be used as the name of the matrix.Examples of valid values for form are , , , , .Constraint: the character length of the format specifier in form must be .
- title
- Type: System..::..StringOn entry: a title to be printed above the matrix, or name of the matrix.If , no title (and no blank line) will be printed.If title contains more than ncols characters, the contents of title will be wrapped onto more than one line, with the break after ncols characters.Any trailing blank characters in title are ignored.If printing in MATLAB mode, title will be used as the name of the matrix.
- labrow
- Type: System..::..StringOn entry: indicates the type of labelling to be applied to the rows of the matrix, except in MATLAB mode where labrow is ignored.
- Prints no row labels.
- Prints integer row labels.
- Prints character labels, which must be supplied in array rlabs.
Constraint: , or .
- rlabs
- Type: array<System..::..String>[]()[][]An array of size [dim1]Note: the dimension of the array rlabs must be at least if , and at least otherwise.On entry: if , rlabs must contain labels for the rows of the matrix, except in MATLAB mode where rlabs is ignored.Labels are right-justified when output, in a field which is as wide as necessary to hold the longest row label. Note that this field width is subtracted from the number of usable columns, ncols.
- labcol
- Type: System..::..StringOn entry: indicates the type of labelling to be applied to the columns of the matrix, except in MATLAB mode where labcol is ignored.
- Prints no column labels.
- Prints integer column labels.
- Prints character labels, which must be supplied in array clabs.
Constraint: , or .
- clabs
- Type: array<System..::..String>[]()[][]An array of size [dim1]Note: the dimension of the array clabs must be at least if , and at least otherwise.
- ncols
- Type: System..::..Int32On entry: the maximum output record length. If the number of columns of the matrix is too large to be accommodated in ncols characters, the matrix will be printed in parts, containing the largest possible number of matrix columns, and each part separated by a blank line.
- indent
- Type: System..::..Int32
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
x04cb prints a real matrix, or part of it, using a format specifier supplied by you.
The matrix is output to the unit defined by (X04ABF not in this release).
References
None.
Error Indicators and Warnings
Errors or warnings detected by the method:
Some error messages may refer to parameters that are dropped from this interface
(LDA) In these
cases, an error in another parameter has usually caused an incorrect value to be inferred.
On entry, , or .
On entry, or , but , or .
On entry, the format specifier in form is more than characters long.
- The format specifier in form cannot be used to output a number. The specifier probably has too wide a field width or contains an illegal edit descriptor.
On entry, either labrow or , or .
- The quantity (where is the width needed for the row labels), is not large enough to hold at least one column of the matrix.
Accuracy
Not applicable.
Parallelism and Performance
None.
Further Comments
x04cb may be used to print a vector, either as a row or as a column. The following code fragment illustrates possible calls.
Example
This example calls x04cb twice, to print matrices of different orders and bandwidths; various options for labelling and formatting are illustrated.