Path: news.mathworks.com!not-for-mail
From: "Daniel Walker " <dwamail.nospam@gmx.ch>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Find nearest index
Date: Tue, 31 Jul 2007 07:05:30 +0000 (UTC)
Organization: MeteoSwiss / ETH Zurich
Lines: 7
Message-ID: <f8mmvp$mb4$1@fred.mathworks.com>
References: <f8mjkc$m3i$1@fred.mathworks.com>
Reply-To: "Daniel Walker " <dwamail.nospam@gmx.ch>
NNTP-Posting-Host: webapp-00-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1185865530 22884 172.30.248.35 (31 Jul 2007 07:05:30 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 31 Jul 2007 07:05:30 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1065993
Xref: news.mathworks.com comp.soft-sys.matlab:421804


... "quick & dirty"

val = 201;
[t_delta, t_ind] = min(abs(myCol-val));

Cheers
D.