functionprint

Convert a complex vector into a string and save it in a file

Extends from Modelica.Icons.Function (Icon for functions).

Information

Syntax

Vectors.print(name, c, fileName);

Description

Convert a complex vector into a string representation and save it line by line in a file. If fileName stays empty, the string will be printed to the log window.

Example

c1 = {Complex(1,3), Complex(2,7), Complex(-3,1)};

Vectors.print("c_vec",c1)
// c_vec =
//    1 + 3*j
//    2 + 7*j
//    -3 + 1*j

Inputs

TypeNameDefaultDescription
Stringname""Name of complex vector
Complex[:]cComplex vector to be printed
StringfileName""Print to fileName; empty fileName prints to the log window