Generate a series based on 3 conditions
Posted: Sun Aug 14, 2022 7:06 am
Hi everyone,
I want to generate series w(t) with the following conditions:
w(t)=0 if a(t)<0
w(t)=a(t) if 0=<a(t)<=1
w(t)=1 if a(t)>1
Could anyone please help me on this command?
Normally with 2 conditions , I use @recode, but I don't know for 3 conditions.
I want to generate series w(t) with the following conditions:
w(t)=0 if a(t)<0
w(t)=a(t) if 0=<a(t)<=1
w(t)=1 if a(t)>1
Could anyone please help me on this command?
Normally with 2 conditions , I use @recode, but I don't know for 3 conditions.