This is my experiment:

CC=(A .<= B)?1:0
CC
CC (1 x 4)

  0   1   1   1

But that wont give you the indexes.

Good luck


On Thu, Nov 21, 2013 at 11:05 AM, Artur T. <artur.tarassow@googlemail.com> wrote:
Hi gretl users,

I am looking for a simple way to determine the column for which scalar B
is, let's say, larger or equal to the entry A[i] and store this
information in scalar C. If B is never greater than any entry in A[i], C
is zero.
Reading out each entry via a loop is possible, but I am wondering
whether there is a short-cut to this.

C = 0
A = seq(4,1)
B = 3
# check at which entry A[i] the value of B >= A[i]

Maybe somebody a nice suggestion :-)

Artur

_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users