Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reduce to zero
Message
De
05/02/2009 15:39:24
 
 
À
05/02/2009 12:42:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01379529
Message ID:
01379626
Vues:
20
>So I want to say if the data today is zero, but the previous point is not, then assume the zero value is an error. To avoid a spike just reduce the previous value by some amount. If the next day the value is zero again then I will again reduce the previous value (already reduced) by some amount. If the data has truly fallen to zero then within a finite/limited number of steps the data will reduce steadily to zero as well and no spike in the plot is shown - rather the data just trails off to zero.
>
>I don't know if the previous data point has already been reduced or not and I don't know when the first zero value occurred (unless I program and store additional info which I dont want to do). Hence I need a formula to just reduce a previous value by some amount if the current value is zero. And to be able to repeat that process a finite number of times so that eventually, if the data truly is now zero, that the data will fall to zero. The purpose here is to avoid data spikes caused by errors in the data.

Could you at least store both the previous raw value and the previous smoothed value?

The advantage here is that if you get two zeroes in a row, that increases the confidence that this is a good value. (I assume.)

Previous Raw Value = X
Previous Smoothed Value = X
New Raw Value = 0
Then New Smoothed value = .5X

Previous Raw Value = 0
Previous Smoothed Value = .5Y
New Raw Value = 0
Then New Smoothed value = 0

The displayed data goes down more quickly.

Do you ever get small invalid values that are greater than zero?

Peter
Peter Robinson ** Rodes Design ** Virginia
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform