Main Content

readall (MDFDatastore)

Read all data in MDF datastore

Description

example

data = readall(mdfds) reads all the data in the datastore specified by mdfds and returns it to timetable data.

After the readall function returns all the data, it resets mdfds to point to the beginning of the datastore.

If all the data in the datastore does not fit in memory, then readall returns an error.

example

data = readall(mdfds,"UseParallel",true) specifies to use a parallel pool to read all of the data. By default, the "UseParallel" option is false. The choice of pool depends on the following conditions:

  • If you already have a parallel pool running, that pool is used.

  • If your parallel preference settings allow a pool to automatically start, this syntax will start one, using the default cluster.

  • If no pool is running and one cannot automatically start, this syntax does not use parallel functionality.

Examples

collapse all

Read all the data from a multiple file MDF datastore into a timetable.

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

Use a parallel pool to read all the data from the datastore into a timetable.

mdfds = mdfDatastore({'CANape1.MF4','CANape2.MF4','CANape3.MF4'});
data = readall(mdfds,"UseParallel",true);

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.

Introduced in R2017b