T O P I C R E V I E W |
coll@inia. |
Posted - 07/06/2016 : 08:01:55 AM Origin Ver.Originpro2015 and Service Release (Select Help-->About Origin): Operating System:win8
I try to use an older script developed in Oirign8.5 (see below) but got the answer range variable no longer valid...????
Could anyone tell me what do I have to do to make it work?
thanks, julio
//ORDER+OUTLIERS+COPY TO SHEET3 wsort bycol:=1;
//FIRST MEANS & SD for(nn=2;nn<=9;nn++) { for(jj=1; jj<=nRows; jj++) { if(col(1)[jj]$==col(1)[jj+1]$) {kk = kk + 1;} else {repes = kk; ini = jj - repes + 1; fin = jj;
//mean1 calculation range gen = col($(nn))[ini:fin]; sum(gen); range rr1 = col(10)[ini:fin]; rr1 = sum.mean; range rr2 = col(11)[ini:fin]; rr2 = sum.sd;
kk = 1; }; // end else if
}; //end for //type -c first mean & sd;
//OUTLIERS for(jj=1; jj<=nRows; jj++) { dato1=col($(nn))[jj]; dato2=col(10)[jj]; dato3=col(11)[jj]; dato4= dato2+dato3; dato5=dato2-dato3; if(dato1>dato4){wcellmask irng:=col($(nn))[jj];}; if(dato1<dato5){wcellmask irng:=col($(nn))[jj];}; }; //end for //type -c outliers masked!; //type -c second means and sd will be calculated now;
//SECOND MEANS & SD for(jj=1; jj<=nRows; jj++) { if(col(1)[jj]$==col(1)[jj+1]$) {kk = kk + 1;} else {repes = kk; ini = jj - repes + 1; fin = jj;
//mean2 calculation range gen = col($(nn))[ini:fin]; sum(gen); range rr1 = col(12)[ini:fin]; rr1 = sum.mean; range rr2 = col(13)[ini:fin]; rr2 = sum.sd;
kk = 1; }; // end else if
}; //end for
//type -c second mean & sd calculated!;
colcopy irng:=Sheet2!col(14) orng:=Sheet3!col($(nn));
}
}
page.active=1; window -a Sheet3;
|
2 L A T E S T R E P L I E S (Newest First) |
coll@inia. |
Posted - 07/07/2016 : 06:23:22 AM Thank you Hideo I am not capable to make it work again nor in different computers. Nevertheless, I found out another similar script in another file which works!
Apparently there is nothing essentially different between the scripts: ???? Therefore I am not pursuing that failure further. I will switch to the other file
Thank you again, julio |
Hideo Fujii |
Posted - 07/06/2016 : 3:45:26 PM Hi coll@inia.,
For me, your code looks okay except the last command: window -a Sheet3; as the window -a command activates the window rather than a sheet.
--Hideo Fujii OriginLab |