Calculate average for an array

Use this forum to post Vensim related questions.
Post Reply
carlaIT
Junior Member
Posts: 3
Joined: Tue Jul 21, 2015 6:50 am
Vensim version: DSS

Calculate average for an array

Post by carlaIT »

Hello,

How can I calculate the average for an array. I see that is posible to SUM and PROD but can´t find the AVG, is there any workaround?

Thanks!
Rafael
Member
Posts: 21
Joined: Sat Aug 07, 2004 5:43 pm
Vensim version: DSS

Re: Calculate average for an array

Post by Rafael »

See the attached model

Rafael
Attachments
Average of array variable.mdl
(1.62 KiB) Downloaded 234 times
Administrator
Super Administrator
Posts: 4626
Joined: Wed Mar 05, 2003 3:10 am

Re: Calculate average for an array

Post by Administrator »

It's really easy,

sum ( some value[array!] ) / elmcount(array)
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Post Reply