How to check that the value is within the spec
Ältere Kommentare anzeigen
Hi,
I have two tables (1) Data table, (2) Spec Table(includes lower & upper limit). First row shows Variable name (A,B,C,D,E) for the same I have the spec table. Here, NA represents spec not defined,and if a variable value is not double just report (NA). I want to do
1. If the status is Fail, then check the corresponding variables (their value) is within the spec or not, if it is in the spec then report OK, else report Out.My output table is shown.Many thanks in advance.
Data table:
Status A B C D E
Success -0.5 9 2 Positive 12
Fail 7 11 23 Positive 3
Success 1 9 18 Deflect 6
Success 1.3 3 15 Positive 12
Fail -6 6 -1 Negative 1
Success 0.8 4 11 Positive 25
Fail 3 9 26 Positive 30
Spec table:
Lower Upper
A -1.5 1.5
B NA NA
C 0 20
E 5 25
Output:
A B C D E
OK NA OK NA OK
Out NA Out NA Out
OK NA OK NA OK
OK NA OK NA OK
Out NA Out NA Out
OK NA OK NA OK
Out NA Out NA Out
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Matrix Indexing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!