Value Decreases

Discussion and support for i2 Standard and i2 Pro applications

Value Decreases

Postby Sqiushy on Thu Feb 25, 2010 9:21 am

Hi there,

I hope you can help me.
I am trying to create a expression that only plots an decrease in a value. eg. Lets say for example that i want to plot the movement of suspension only if the travel is moving in a negative direction.

I know i have to start with a 'choose' statement but i am not sure how to 'get' the position of the suspension if it is moving in a particular direction. Just to clarify, I dont want the suspension position between two values, i want the suspension plotted if it moves in X direction.

I know that might not make perfect sense

Any thoughts would be welcome.
Take Care

SQ
Sqiushy
 
Posts: 2
Joined: Wed Feb 24, 2010 8:05 pm

Re: Value Decreases

Postby Fermin on Sun Feb 28, 2010 1:15 am

Maybe it is your solution (v1.05 i2pro):

SuspPosFLSuav20: smooth('Susp Pos FL' [mm],20)

SuspPosFLSuav20_travel_positive_direction: (1/(derivative(smooth('Susp Pos FL' [mm],20)) > 0)) * smooth('Susp Pos FL' [mm],20)

SuspPosFLSuav20_travel_negative_direction: (1/(derivative(smooth('Susp Pos FL' [mm],20)) < 0)) * smooth('Susp Pos FL' [mm],20)

or if you prefer the function choose:

SuspPosFLSuav20_travel_positive_direction:choose(derivative(smooth('Susp Pos FL' [mm],20)) > 0, smooth('Susp Pos FL' [mm],20),1/0)

SuspPosFLSuav20_travel_negative_direction:choose(derivative(smooth('Susp Pos FL' [mm],20)) < 0, smooth('Susp Pos FL' [mm],20),1/0)
Fermin
 
Posts: 6
Joined: Tue Feb 10, 2009 2:10 am

Re: Value Decreases

Postby Sqiushy on Fri Mar 05, 2010 12:28 am

Perfect, thanks a lot.

Good stuff there, got me thinking

Thanks again.

-SQ
Sqiushy
 
Posts: 2
Joined: Wed Feb 24, 2010 8:05 pm


Return to i2 Data Analysis Software

Who is online

Users browsing this forum: No registered users and 3 guests