Hi,
Please run the script lines below to calculate the average values for every 5 rows of col(A) in current worksheet:
loop(ii,1,4)
{
jj=ii*5-4;
range rr=col(A)[jj:jj+4];
sum(rr);
mymean=sum.mean;
col(B)[ii]=mymean;
}
To run the same syntax on all worksheets in current project simultaneously, you can use doc –e command. See the example below:
Doc –e LB
{
range rr=col(A)[1:5];
sum(rr);
mymean=sum.mean;
col(B)[1]=mymean;
}
http://www.originlab.com/doc/LabTalk/ref/Document-cmd#-e_object_.7Bscript.7D.3B_Execute_the_given_script_for_all_objects
Originlab Technical Service Team