%% Quality Descriptions
% Create a timeseries object ts, specifying a quality vector made up of zeros and ones. Assign values to the QualityInfo.Code and QualityInfo.Description properties, and display the quality descriptions.

ts = timeseries([3 4.2 5 6.1 8]',1:5,[1 0 1 0 1]');
ts.QualityInfo.Code = [0 1];
ts.QualityInfo.Description = {'Good' 'Bad'};
tsquality = getqualitydesc(ts)

% Copyright 2012 The MathWorks, Inc.