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

Please how can I apply a tolerance or condition for data written in text files ?
Please see the code below.
Many thanks

Answers (1)

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 Comments

Thanks for your comment,
Actually, I have a code for this automation and I need to put a tolerance for at least stress in file one and two or strain. If my data > or < than the tolerance go to update the model.
So you already have code for doing this? Then what/why are you asking?
Sorry I mean I have a code for all automation process, but I need to include a tolerance to amend the model.
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.
I'm wondering why you don't just subtract the two lists of numbers like I suggested.

Sign in to comment.

Categories

Asked:

ND
on 12 Nov 2015

Edited:

ND
on 20 Nov 2015

Community Treasure Hunt

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

Start Hunting!