On Tue, 25 May 2010, Henrique Andrade wrote: > Dear Gretl Community, > > I'm trying to use a loop index inside a script but I don't know how. According > to "Gretl User’s Guide" the syntax looks like this: > > loop i=1..24 > > But I just need the points where "i" is equal to 6, 12 and 24. Something like > this: > > loop i=6;12;24 > > How can I do that?
For example, this way: <script> matrix foo = { 6, 12, 24 } n = cols(foo) loop for i=1..n bar = foo[i] print bar end loop </script> Riccardo (Jack) Lucchetti Dipartimento di Economia Università Politecnica delle Marche r.lucchetti(a)univpm.it http://www.econ.univpm.it/lucchetti