What is the difference between Valid(X X1 X2) and ValidLR(X X1 X2 L R) functions?
Yann_Le_Floch
Altair Employee
Valid and ValidLR allow creating rectangular pulse function. Both functions have similar operation, it returns 0 or 1. However, by using ValidLR you can decide to exclude or not the lower limit X1 (L=0 or L=1) and/or the superior limit X2 (R=0 or R=1). If L=0, you exclude the inferior limit and if L=1, you don't exclude the inferior limit. If R=0, you exclude the superior limit and if R=1, you don't exclude the superior limit.
Function | Definition | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Valid(X,X1,X2) | = 1 if x1 ≤ x < x2 = 0 else | |||||||||||||||
ValidLR(X,X1,X2,L,R) | = 1 if
= 0 else |
0