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>
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------