W dniu 28.05.2017 o 11:42, Riccardo (Jack) Lucchetti pisze:
On Sun, 28 May 2017, Riccardo (Jack) Lucchetti wrote:

On Sun, 28 May 2017, Marcin Błażejowski wrote:

Hi,

suppose I have really big vector/matrix (I mean 100000 or more rows and
1-2 cols) and I need to find out the position of certain value stored in
the first column in this matrix (like iminc and imaxc but for an
arbitrary value). The matrix is not sorted and it may systematically
grow (new rows are added at the bottom).

The question is: what is the numerical most effective may of doing this?

Question: what if the value is repeated?


anyway: something like this?

<hansl>
n = 100000
a = mrandgen(i,1,1000,n,2)

target = 365
column = 1

sel = a[,column] .= target
c = selifr(seq(1,n)'~a, sel)
print c
</hansl>
Jack,
it's briliant  - as usual.

Thans a lot!!!
Marcin

-------------------------------------------------------
  Riccardo (Jack) Lucchetti
  Dipartimento di Scienze Economiche e Sociali (DiSES)

  Università Politecnica delle Marche
  (formerly known as Università di Ancona)

  r.lucchetti@univpm.it
  http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------


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


-- 
Marcin Błażejowski