Hi all,
this is probably very basic question, but i couldn't find an answer on internet or help files. How can i make a loop in mata over some random seqence of numbers for example (2,4,67,5,888,44)
I realize i can create vector and loop over its values, but still going over ordered sequence, like
but is there something more direct like stata foreach v in .... ?
Thanks!
this is probably very basic question, but i couldn't find an answer on internet or help files. How can i make a loop in mata over some random seqence of numbers for example (2,4,67,5,888,44)
I realize i can create vector and loop over its values, but still going over ordered sequence, like
Code:
mata c = (2,33,4,5,67,8) for (i=1; i<=length(c); i++) { g = c[1,i] g } end
Thanks!
Comment