[gradsusr] A problem about Function ave()

MY funnytyphoon at gmail.com
Thu Oct 28 10:07:59 EDT 2010


this is the grammar.  you can use 'd ave(var,t+0,t=144,12)' but not 'd
ave(var, t=t+0, t=144,12)'

'd ave(pr,t='i*12+6',t='i*12+8')'  is ok.
++++++++++++++++++++++++++++++++++++++++++++++++++++
YING, Ming
Shanghai Typhoon Institute of China Meteorological Administration
166 Puxi Road, Xuhui District, Shanghai, 200030
PR China
++++++++++++++++++++++++++++++++++++++++++++++++++++





在 2010年10月28日 下午4:27,曹宁 <caoning1525 at gmail.com> 写道:
> Hi, everyone!
> I am a student from China. Here I come across a problem about Function
> ave(), and need your help.
>
> As we know, Function ave() has the following form: ave(expr, dim1,
> dim2 <,tinc> <,-b>). I tried two methods that look the same in using
> ave(),but got very different results.
>
> Method 1:
> i=1
> while(i<50)
> 'set t 'i''
> 'd ave(pr,t='i'*12+6,t='i'*12+8)'
> i=i+1
> endwhile
>
> Method 2:
> i=1
> while(i<50)
> 'set t 'i''
> m=i*12+6
> n=m+2
> 'd ave(pr,t='m',t='n')'
> i=i+1
> endwhile
>
>
> According to the results, the second is the right way. But I do not
> know why. Who can help me? Thanks!
>
> --
> 曹宁
>
> 中国科学技术大学 地球和空间科学学院
> 安徽省益和公益事业发展工作小组
> 安徽公益信息网 http://www.ahngo.org
> QQ:434759419
> Skype:caoningskype
> Gmail/Gtalk:caoning1525 at gmail.com
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>




More information about the gradsusr mailing list