What is the difference between Valid(X X1 X2) and ValidLR(X X1 X2 L R) functions?

Yann_Le_Floch
Yann_Le_Floch
Altair Employee
edited November 2021 in Altair HyperWorks

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.

FunctionDefinition
Valid(X,X1,X2)

= 1 if x1 ≤ x < x2

= 0 else

ValidLR(X,X1,X2,L,R)= 1 if

L
R
X1 ≤ X ≤ X2 1
1
X1 < X ≤ X20
1
X1 ≤ X < X21
0
X1 < X < X20
0

= 0 else

Tagged: