# variable moment

hi,
I want to apply a moment on hand that is variable with time. It defined in three different period.
T<0.4
moment=0
0.4<=T<0.6
moment=-078.11*(T)^2+12.728
0.6<=T<0.4
moment=-073.6*(T)^2+15.88

how can i do this?

Hi ?

This can be done using the AnyFunIf and the other logic functions available, please go the reference manual and search for AnyFunIf, then click the associated sample file. This file shows many ways of using logical expression inside AnyBody.

I imagine you could have something like this

M1=0.4
M2=-078.11*(T)^2+12.728
M3=-073.6*(T)^2+15.88

M=M1T1+M2T2+M3*T3

Your variable T i assume is the time you can get in the study so something like Main.MyStudy.t

Here T1-T3 would have to be either 0 or 1, which could be controlled by the logical expressions available.

Best regards
Søren

thank you for recommendation
but i could not work with anyfunif
can you explain it more?

Hi ?

Please explain in more detail why you could not work with AnyFunIf ?

which problems did you encounter?
did you find the sample file link in the reference manual?

Best regards
Søren

Anyfunif dos’nt accept condition > or <

Hi ?