Fetch the current data but with 3 steps between.

Use this forum to post Vensim related questions.
Post Reply
haruki
Junior Member
Posts: 5
Joined: Sat Dec 27, 2008 7:11 pm

Fetch the current data but with 3 steps between.

Post by haruki »

If I have a graph and I only want to fetch the data from it each third steps. what kind of function could do this?

Example..

Graph
1=5
2=3
3=8
4=3
5=2
6=21
7=8
8=6
9=19

This means i want to get the following result
0, 0, 8, 0, 0, 21, 0, 0, 19 (each third step, get value from graph).

Anyone?

Sincerely,
Peter
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

Have a look at the modulo function, and then use an IF THEN ELSE statement. Using a combination of the two you can do this quite easily.

Hope this helps.

Tony.
haruki
Junior Member
Posts: 5
Joined: Sat Dec 27, 2008 7:11 pm

Post by haruki »

Hm, could you give me an example how you mean?
haruki
Junior Member
Posts: 5
Joined: Sat Dec 27, 2008 7:11 pm

Post by haruki »

Nevermind, got it to work.
Thnx..

IF THEN ELSE(MODULO(Time, 4)=0, X, 0)
Post Reply