On Thu, 4 Feb 1999, Bernhard Bruemmer wrote:
|Dear Marie-Edith,
|the code I used for similar purposes utilizes the vecindex function
|and submatrix extraction. vecindex returns row indices, therefore
|the vectors have to be transposed.
|----start code---
|i=<7 5 4 3>';
|j=(<1 2 3 4 5 6 7> |< 0.1 0.2 0.3 0.4 0.5 0.6 0.7>)';
|trunc=j[vecindex(j[][0],i)][]';
|print(trunc);
|----end code---
Dear Bernhard,
Thank you very much: your code, plus the reversec function as I need
to have the elements in trunc in the same order as the elements in i,
solves perfectly my problem.
Marie-Edith.
_______________________________________________________________________
Marie-Edith Bissey email: [log in to unmask]
Department of Economics tel: (+44) 1904 43 35 72
University of York fax: (+44) 1904 43 37 59
YORK YO1 5DD
UK.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|