Account the number of time that something happen

Discussion and support for i2 Standard and i2 Pro applications

Account the number of time that something happen

Postby Fermin on Wed Feb 11, 2009 1:44 am

Hi, I dont speak english, but I wait that you can understand me. I seek a expression that it account the frequency, the number of times, that something happen, for example, the number of times that the car is in second gear, etc.

I can do this, but I need five expressions by each parameter that I want know the number of times

Example that I do:

A: 'Gear' == 2
B: time_shift('A',0.001) [Rate:1000Hz]
C: max('A' - 'B',0)
D: integrate('C') [Rate:1000Hz]
Nº of time in 2º gear: (stat_max('D') - stat_min('D')) * 1000 [Rate:1000Hz]

I seek something more simple, this way consume many resources of the PC.

Can you help me?

Thanks.
Fermin
 
Posts: 6
Joined: Tue Feb 10, 2009 2:10 am

Re: Account the number of time that something happen

Postby OmarK on Fri Feb 20, 2009 3:12 pm

i2 doesn't have a "count" function that you are looking for yet. I usually export data into excel and perform maths calculations as well as produce summary charts and graphs, maybe this could be an option.
OmarK
 
Posts: 214
Joined: Mon Nov 10, 2008 4:39 pm

Re: Account the number of time that something happen

Postby mangel83 on Thu Sep 27, 2012 7:00 am

3 years after the original post I wanted to know if the function was included, i.e. to count the number of gearshifts per lap.

Is it possible?
mangel83
 
Posts: 10
Joined: Wed Oct 22, 2008 6:30 am

Re: Account the number of time that something happen

Postby Martin on Fri Oct 05, 2012 10:05 pm

this is how I count
integrate(abs(derivative('Gear')))
User avatar
Martin
Pro User
 
Posts: 640
Joined: Thu Jul 10, 2008 2:57 am
Location: Pretoria, Suid Afrika

Re: Account the number of time that something happen

Postby ElectronSpeed on Sat Feb 02, 2013 2:53 am

Martin,

I like your solution.

I was having a problem trying to count RISING edges of a pulsed signal. Ultimately, I took your solution and divided by 2.

Eric Schieb
ElectronSpeed
 
Posts: 49
Joined: Wed Jul 30, 2008 1:12 pm


Return to i2 Data Analysis Software

Who is online

Users browsing this forum: No registered users and 8 guests