averaging in every possible combinations

From: Debasish PaiMazumder <debasish_at_nyahnyahspammersnyahnyah>
Date: Wed Apr 14 2010 - 08:16:31 MDT

Dear All,

I have five numbers. I would like to calculate the average of one or
more number in every possible combinations.

For example: my numbers are a, b, c, d, e
              the new variables is AVG(ndim)
              where AVG(0)=a, AVG(1)=b, AVG(2)=c, AVG(3)=d, AVG(4)=e,
AVG(5)=average(a,b), AVG(6)=average(a,c),......,AVG(i)=average
(a,b,c), AVG(i+1)=average(a,b,d),.....
                    AVG(j)=average(a,b,c,d),AVG(j+1)=average
(a,b,c,e),......AVG(n)=average(a,b,c,d,e)

Is there any easiest way in NCL to solve this problem

Thanks

Debasish

Debasish PaiMazumder, PhD
Postdoctoral Researcher
Analysis and Simulation of Regional-Scale Climate
Department of Earth and Atmospheric Sciences
University of Québec at Montréal (UQÀM)
550, Sherbrooke west, 19th floor, west tower,
Montréal, QC, Canada H3A 1B9
Tel: (514) 282-6464-343
      (514) 937-0042 (R)
email: debasish@sca.uqam.ca

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Apr 14 08:22:10 2010

This archive was generated by hypermail 2.1.8 : Fri Oct 29 2010 - 13:25:49 MDT