03-28-2012 09:19 PM
Hi, i am trying to count how many times a specific values appears in my data, for example: in my data the value changes between '1', '2', '3', '4', '5', '6', and I want to know how many times the value 3 hat appeared. Do you have any idea with which function can I analysis it, thanks!
waldy
03-29-2012 09:00 AM
Top of my head here.
Have you tried Analysis>Statistics>Histogram Classification. That should give you a good starting point for counting your events.
Regards
Matthew
03-30-2012 03:22 AM
Thank you for your reply.
I think I haven't described my problem so clearly.
What I want is the value appears time period:
e.g. value '3' appears during the time 'A' and keep constant, and there is
no another value appeared during the time 'A', then count value'3' just for
one time; only when the value '3' changed to value '2' or another value, and
change back to value '3', then count value'3' for the second times.
With >Histogram Classification get the appears times after every second,
e.g. time 'A' take 10 seconds, and the value was constant with '3',then will get
">Histogram Classification" for 10 times, actually I count here just for one time.
03-30-2012 04:33 AM
Ok, I think I have a better understanding of your problem now. How about doing it via a script? Something I made up on the fly:
Option Explicit 'Forces the explicit declaration of all the variables in a script.
Dim LoopCount, CurVal, PrevVal, ThreeCount
ThreeCount = 0
PrevVal = 0
For LoopCount = 1 To ChnPropValGet("["&GroupCount&"]/Channel", "length") ' Modify this line for your group and Channel name
CurVal = CHV(LoopCount,"["&GroupCount&"]/Channel") ' Modify this line for your group and Channel name
If CurVal = 3 and PrevVal <> 3 Then
ThreeCount = ThreeCount + 1
End If
PrevVal = CurVal
Next
Call LogFileWrite(ThreeCount)
Regards
Matthew