ToCSV
This block writes data into a CSV file. The first line of the CSV file must include the variable names, and the first variable name should be "time".
Library
Activate/SignalExporters
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
fname | CSV Filename | Name of the CSV file. | String | |
nin | Number of exported variables | Number of variables that should be exported to the CSV file. | Number | |
inports | Variable selection | Structure | ||
inports/varname | Variable name | Cell of strings | ||
inports/vardatatype | Datatype | Cell of strings | 'double' | |
Separator | CSV file separator character | Separator or delimiter of the CSV file. Default: ','. | String | |
SubS | Sub-sampling rate | Reduces the number of data points exported by a factor. Default: 1. | Scalar | |
addTime | Name of the first column | If the name is omitted, a time column will not be added to the CSV file. | String | |
quotedNames | Variable names should be quoted | Number | 0 | |
externalActivation | External activation | Specifies whether the block receives an external activation or inherits its activation through its regular input ports. When External Activation is selected, an additional activation port is added to the block. By default, external activation is not selected. | Number | 0 |
append | Append data | Append data to the end of an existing CSV file. | Number | 0 |
increasingTime | Strictly-increasing time | Select to create a strictly-increasing time sequence. | Number | 0 |
BufferSize | Buffer size | Scalar |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
Port 1 | explicit | input | nin | |
Port 2 | activation | input | externalActivation |
Advanced Properties
Name | Value | Description |
---|---|---|
always active | no | |
direct-feedthrough | yes | |
zero-crossing | no | |
mode | no | |
continuous-time state | no | |
discrete-time state | no |