modelprintToFile
Information
Prints input variable "x" to a comma delimited file (time,x).
Note, ensure the Simulation setup simulation time and output interval match the specified "dtime".
Example: Will Work
The following simulation setup will work because the output calculations are returned every second, and hence the dtime second interval values are accessible.
dtime = 60
Start time = 0
Stop time = 500 s
Number of intervals = 500
Example 2: Won't Work
The following simulation setup will NOT work because the output calculations are no returned at intervals of dtime (i.e., 60 seconds)e.
dtime = 60
Start time = 0
Stop time = 500 s
Number of intervals = 490
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | dtime | Time interval for printing. Note: Choose proper simulation and output intervals | |
| String | fileName | "" | file name (e.g. ''myfile.txt'') |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Real | x | Variable to be printed |