[gradsusr] A problem about Function ave()

曹宁 caoning1525 at gmail.com
Thu Oct 28 04:27:15 EDT 2010


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




More information about the gradsusr mailing list