Generate file suitable for use by real-time From File block (not recommended)
xpcbytes2file(filename,var1,. . .,varn)
Name of the data file from which the From File block distributes data.
Column of data to be output to the model.
xpcbytes2file(filename,var1,. . .,varn) outputs
one column of
var1, . . .,varn from file
every time step. All variables
must have the same number of columns; the number of rows and data
types can differ.
If the data is organized such that a row refers to a single
time step and not a column. pass to
transpose of the variable. To optimize file writes, organize the
data in columns.
In the following example, to use the real-time From File block to output a variable
precision, scalar) and
velocity (double, width
3) at every time step, you can generate the file with the command:
xpcbytes2file('myfile', errorval, velocity)
errorval has class
dimensions [1 x N] and
velocity has class
dimensions [3 x N].
Set up the real-time From File block to output
28 bytes (1 * sizeof('single') + 3 * sizeof('double'))
at every sample time.