[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re:vectorization
From: |
Kai Habel |
Subject: |
Re:vectorization |
Date: |
Wed, 4 Dec 2002 12:19:58 -0600 |
Take a look at lookup.m at the octave-forge repository.
If every element of i_num is in v_num and i_num is monotone you can use it out
of the box, otherwise you have to adapt it for your purposes.
octave:12> inum=[1 3 4 6 7 10 15];
octave:13> vnum=[4 10];
octave:14> lookup(inum,vnum)
ans =
3 6
Bye Kai
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------