Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

read (MDFDatastore)

Read data in MDF datastore

Syntax

data = read(mdfds)
[data,info] = read(mdfds)

Description

example

data = read(mdfds) returns data from the MDF datastore mdfds into the timetable data.

The read function returns a subset of data from the datastore. The size of the subset is determined by the ReadSize property of the datastore object. On the first call, read starts reading from the beginning of the datastore, and subsequent calls continue reading from the endpoint of the previous call. Use reset to read from the beginning again.

example

[data,info] = read(mdfds) also returns to the output argument info information, including metadata, about the extracted data.

Examples

collapse all

Read data from an MDF datastore one file at a time.

mdfds = mdfDatastore({'CANape1.MF4','CANape2.MF4','CANape3.MF4'});
mdfds.ReadSize = 'file';
data = read(mdfds); 

Read the second file and view information about the data.

[data2,info2] = read(mdfds);
info2 
  struct with fields:

             Filename: 'CANape2.MF4'
             FileSize: 57592
    MDFFileProperties: [1×1 struct]

Input Arguments

collapse all

MDF datastore, specified as an MDF datastore object.

Example: mdfds = mdfDatastore('CANape.MF4')

Output Arguments

collapse all

Output data, returned as a timetable of MDF records.

Information about data, returned as a structure array with the following fields:

Filename
FileSize
MDFFileProperties

See Also

Functions

Introduced in R2017b

Was this topic helpful?