Good morning all.
I was wondering if somebody could help with the following conundrum. I have a series of non-uniform, non-random pulses throughout a year (called "pulses1"). I want to filter this series so that, for instance, half continue to be a pulse (value 1) wheras the other half become 0. I can achieve this with the use of the following equation:
IF THEN ELSE( MODULO( Time , 2 ), "pulses1" , 0)
However, as you can see, the pattern is not random and will be exactly the same every run. How do I introduce an amount of randomness?
Simply making the number 2 a random distribution with a mean of 2 obviously doesn't work.
Thanks again.
Nik
[Edited on 11-27-2006 by nikvyas]
[Edited on 11-27-2006 by nikvyas]
[Edited on 11-27-2006 by nikvyas]
Randomly sampling pulses.
Do you guys think the following approach is OK?
variable=RANDOM EXPONENTIAL( 0 , 1 , 0 , 0.5 , 1234 )
filtered=IF THEN ELSE( variable<=0.5,"pulses1",0)
So, if I only want 40% of pulses to go through, I can just alter the equation to:
filtered=IF THEN ELSE( variable<=0.4,"pulses1",0)
All advise greatly appreciated.
Thanks
Nik
variable=RANDOM EXPONENTIAL( 0 , 1 , 0 , 0.5 , 1234 )
filtered=IF THEN ELSE( variable<=0.5,"pulses1",0)
So, if I only want 40% of pulses to go through, I can just alter the equation to:
filtered=IF THEN ELSE( variable<=0.4,"pulses1",0)
All advise greatly appreciated.
Thanks
Nik
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm