Main Content

hasdata

Determine if data is available to read from TDMS datastore

Since R2022a

Description

example

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

Examples

collapse all

In a while-loop, use hasdata to determine if there is any more data to read at the current location.

tdmsds = tdmsDatastore(tdmsDatastore("C:\data\tdms"));
while hasdata(tdmsds)
    m = read(tdmsds);
        ⋮
end

Input Arguments

collapse all

TDMS datastore, specified as a TDMSDatastore object.

Example: tdmsds = tdmsDatastore("C:\data\tdms")

Output Arguments

collapse all

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

Version History

Introduced in R2022a

See Also

Functions