signalgenerator-fileinput

Navigation:  Library > Signal > Sources >

signalgenerator-fileinput

Previous pageReturn to chapter overviewNext page

Library

Signal\Source

Use

Domains: Continuous. Size: 1-D. Kind: Block Diagrams.

Note

This model is obsolete. Use the DataFromFile block instead to read data file.

Description

This model generates an output by linear interpolation of data read from file. The data on file is stored in columns. The first column contains the time values (t) and the second column contains the corresponding output values (y).

The time data of the first column needs to be monotonically increasing.
Discontinuities are allowed, by providing the same time point twice in the table.
Values outside of the range, are computed by linear extrapolation of the last two points.

file:

 

0

0.5

2.5

3.5

4.5

5.5

7

8

 

 

0.5

-1

-1

0

1

1.75

2.5

2.5

data

Example of an input file.

The input file must be an ASCII (text) file and should consist at least two columns of data. The first column (number 0) should always contain the time values. The other columns (number 1, 2, 3, etc.) should contain the corresponding data values. The parameter column is used to specify which column is used for as output data.

 

The various values must be separated by a comma, a space or a tab. Each new set of time and data values must start on a new line. No comment or other text may be part of the file. The filename of the input file can be specified using the complete path (e.g. c:\data\data.tbl ). When no path is given, the file is assumed to be in the experiment directory.

Interface

Outputs

Description

output

 

Parameters

 

filename

column

Filename of the input file.

column number.

 

Example

Example data.tbl file with header and 1 column with data:

 

"time","y"

0.0, 0.5

0.5, -1

2.5, -1

3.6, 9