Hi there,
this is  an ordinary  if then or else loop in Fortran and Basic, but instead 
of storing the found result in "C"
I'suggest creating a (4x1) matrix columm vector and store the  "found values 
in the column vector at each "i" location
and I suspect it is the same in Gretl but I confess to being a novice at 
Gretl sorry to say right now
Best wishes to all,
Hope these few commnts are of small help
Good luck
Richard Hudson




Dr RJF Hudson
----- Original Message ----- 
From: "Artur T." <artur.tarassow(a)googlemail.com>
To: "Gretl list" <gretl-users(a)lists.wfu.edu>
Sent: Thursday, November 21, 2013 9:05 PM
Subject: [Gretl-users] small practical issue


> 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(a)lists.wfu.edu
> http://lists.wfu.edu/mailman/listinfo/gretl-users 

Reply via email to