functionreadStringCSV
Read real matrix from CSV file
Extends from Modelica.Icons.Function (Icon for functions).
Information
This functions reads an array from a CSV file and returns a matrix of equal size. The array size of the CSV file is specified by the integers
rowBeginandrowEnd,colBeginandcolEnd.
File format
- Recommended delimiters are
- "\t" tab
- " " space
- "," comma
- The decimal separator must be .
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| String | fileName | CSV file name | |
| Integer | rowBegin | 1 | First row of CSV array |
| Integer | rowEnd | rowBegin | End row of CSV array |
| Integer | colBegin | 1 | First column of CSV array |
| Integer | colEnd | colBegin | End column of CSV array |
| String | delimiter | "\t" | Delimiter of CSV file |
| Boolean | useQuotedStrings | false | Use quoted strings, if true |
| Boolean | cache | false | Read file before compiling, if true |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| String[rowEnd - rowBegin + 1,colEnd - colBegin + 1] | matrix | Matrix read from CSV file |