WOLFRAM SYSTEM MODELER

toString

Convert a matrix into its string representation

Wolfram Language

In[1]:=
SystemModel["Modelica.Math.Matrices.toString"]
Out[1]:=

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

Syntax

Matrices.toString(A);
Matrices.toString(A, name="", significantDigits=6);

Description

The function call "Matrices.toString(A)" returns the string representation of matrix A. With the optional arguments "name" and "significantDigits", a name and the number of the digits are defined. The default values of name and significantDigits are "" and 6 respectively. If name=="" then the prefix "<name> =" is left out.

Example

A = [2.12, -4.34; -2.56, -1.67];

toString(A);
// = "
//      2.12   -4.34
//     -2.56   -1.67";

toString(A,"A",1);
// = "A =
//         2     -4
//        -3     -2"

See also

Vectors.toString

Syntax

s = toString(M, name, significantDigits)

Inputs (3)

M

Type: Real[:,:]

Description: Real matrix

name

Default Value: ""

Type: String

Description: Independent variable name used for printing

significantDigits

Default Value: 6

Type: Integer

Description: Number of significant digits that are shown

Outputs (1)

s

Default Value: ""

Type: String

Description: String expression of matrix M