How can I apply absolute tolerance with data written in two text files ?

조회 수: 2 (최근 30일)
ND
ND 2015년 11월 12일
편집: ND 2015년 11월 20일
Please how can I apply a tolerance or condition for data written in text files ?
Please see the code below.
Many thanks

답변 (1개)

Image Analyst
Image Analyst 2015년 11월 12일
Have two thresholds (control limits) - one that defines low bad data, and one that defines high bad data. Then just see if any elements are outside of your range
badDataLocations = data < lowThreshold | data > highThreshold; % Map of bad data locations. (Use single vertical bar, not double).
hasBadData = any(badDataLocations(:)); % Boolean flag to indicate that you have bad data somewhere.
  댓글 수: 5
Image Analyst
Image Analyst 2015년 11월 14일
What do you mean by tolerance? I gave you code to determine which, if any, values in a numerical array were outside of some acceptable range. What more or different operations do you want? Please explain in detail with some actual numbers that are both within tolerance and outside of tolerance. First, read this then give actual input and output values as an example.
Image Analyst
Image Analyst 2015년 11월 14일
I'm wondering why you don't just subtract the two lists of numbers like I suggested.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by