How to exclude data based on quality control flags

조회 수: 1 (최근 30일)
Addie
Addie 2019년 10월 15일
편집: Adam Danz 2019년 10월 16일
Hi,
I have a data set where each value has a quality control flag associated with it. What would be the most effecient way for me to exclude and include values based on QC value?
  댓글 수: 2
Adam Danz
Adam Danz 2019년 10월 15일
편집: Adam Danz 2019년 10월 16일
There's not enough detail in your question. Let's assume you have a vector of data "x" and a vector of QC values "qc". I assume the qc values are numeric or logical.
If they are logical and 'true' means "keep",
x(qc) %this eliminates any of the bad data
% or
x(qc) = NaN; % This replaces any of the bad data with "missing" data
The benefit of the 2nd line above is that the size and index values of 'x' do not change.
If your qc values are numeric and range from j to i, you can set a threshold 't' where any qc values greater than t are accepted.
xAccepted = x(qc > t);
% or
x(qc <= t) = NaN;
Addie
Addie 2019년 10월 16일
Apologies for the lack of detail. x(qc <= t) = NaN; is a great solution. Thank you Adam Danz!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Desktop에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by