|
From: | William Krekeler |
Subject: | RE: elegant solution to address an element of an array [newbie] |
Date: | Fri, 4 Feb 2011 17:52:20 +0000 |
Nukey, you want index = find( f == 27500 ); % fails if 27500 doesn't exist, note
you had = not == which is required or [ minValue, index ] = min ( abs(f - 27500) ); % grabs
the value nearest 27500 if 27500 doesn't exist desiredValue = An(index) Bill Krekeler From: address@hidden
[mailto:address@hidden On Behalf Of BVBA NuKey Music I am looking for a more elegant solution to the
following problem |
[Prev in Thread] | Current Thread | [Next in Thread] |