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.

hasdata (MDFDatastore)

Determine if data is available to read from MDF datastore

Syntax

tf = hasdata(mdfds)

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 false (0).

See Also

Functions

Introduced in R2017b

Was this topic helpful?