Main Content


Get data from file reader



rd = getData(fr,sourceName) returns the data recorded from the specified source in the file reader. The fr input is an socFileReader object. The sourceName is the source name specified when saving the file by using the save object function.


collapse all

Create a file reader to read data from the specified TGZ-compressed file.

fr = socFileReader('UDPDataReceived.tgz');

Get the data of a specified source from the file using the getData function.

rd = getData(fr,'UDPDataReceived-Port25000');

Input Arguments

collapse all

File reader, returned as an socFileReader object.

Name of a recorded data source in fr, specified as a character vector. The function returns the recorded data of this specified source.

Output Arguments

collapse all

Data from recorded source, returned as a timeseries object.

Data Types: timeseries

Version History

Introduced in R2019a