getqualitydesc
Quality descriptions of the samples of a timeseries.
Category: Language Fundamentals > Data Types
Syntax
d = getqualitydesc(ts)
Returns the quality text of each sample.
Description
Each sample can carry an integer quality code in ts.Quality. ts.QualityInfo maps codes to descriptions through its Code and Description fields. getqualitydesc looks up the code of every sample and returns the matching text.
Input arguments
tstimeserieswithQualitycodes andQualityInfoset.
Output arguments
d- Cell array with one description per sample. It is empty when the series has no quality codes.
Example
Quality text per sample
ts = timeseries([1; 2; 3; 4], [0; 1; 2; 3]);
ts.Quality = [1; 1; 0; 1];
ts.QualityInfo.Code = [0 1];
ts.QualityInfo.Description = {'bad', 'good'};
getqualitydesc(ts)
Output
ans = 4×1 cell
{'good'}
{'good'}
{'bad' }
{'good'}