functionwriteRealCSV

Writing real matrix to CSV file

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

Information

This functions writes an array to a CSV file including header. If the header is not specified explicitly, the header is not written to the CSV file. Each row of the header string is written to the CSV file. However, the number of columns of matrix and header have to match.


File format

  • Recommended delimiters are
    • "\t" tab
    • " " space
    • "," comma
  • The decimal separator is represented by .

Inputs

TypeNameDefaultDescription
StringfileName"Name of file"
Stringdelimiter"\t"Delimiter
Real[:,:]matrixActual matrix to be written to CSV file
Stringheaderfill("", 0, size(matrix, 2))Header lines to be written to CSV file
IntegersignificantDigits6Number of significant digits