hasdata (MDFDatastore)

Determine if data is available to read from MDF datastore

Description

example

tf = hasdata(mdfds) returns logical 1 (true) if there is data available to read from the MDF datastore specified by mdfds. Otherwise, it returns logical 0 (false).

Examples

collapse all

Use hasdata in a loop to control read iterations.

mdfds = mdfDatastore(fullfile(matlabroot,'examples','vnt','CANape.MF4'));
while hasdata(mdfds)
    m = read(mdfds);
end

Input Arguments

collapse all

MDF datastore, specified as an MDF datastore object.

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

Output Arguments

collapse all

Indicator of data to read, returned as a logical 1 (true) or 0 (false).

See Also

Functions

Introduced in R2017b