Hi Robinou,
The following code should work. In your code, you don't have to (or I say shouldn't) use
$(...) substitution to convert a number to a string. You just keep using ii as a numeric counter.col(2)[1]=1;
loop (ii,2, 300000){
col(2)[ii]=col(2)[ii-1]+col(1)[ii];
}
This code runs in 10.3 sec for data with 300,000 rows on my machine.
Hope this is okay.
--Hideo Fujii
OriginLab
P.S. The following 1-line script runs in 0.36 sec. You can try.col(2)=sum(col(1));