.Modelica.Math.Vectors.toString

Information

Syntax

Vectors.toString(v);
Vectors.toString(v,name="",significantDigits=6);

Description

The function call "Vectors.toString(v)" returns the string representation of vector v. 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=="" (empty string) then the prefix "<name> =" is left out at the output-string.

Example

  v = {2.12, -4.34, -2.56, -1.67};
  toString(v);
                         // = "
                         //           2.12
                         //          -4.34
                         //          -2.56
                         //          -1.67"
  toString(v,"vv",1);
                         // = "vv =
                         //           2
                         //          -4
                         //          -3
                         //          -2"

See also

Matrices.toString,

Interface

function toString
  extends Modelica.Icons.Function;
  import Modelica.Utilities.Strings;
  input Real v[:] "Real vector";
  input String name = "" "Independent variable name used for printing";
  input Integer significantDigits = 6 "Number of significant digits that are shown";
  output String s = "";
end toString;

Revisions


Generated at 2020-06-05T07:38:22Z by OpenModelica 1.16.0~dev-420-gc007a39