Findindx: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
(Importing text file)
 
imported>Jeremy
(Importing text file)
Line 1: Line 1:
===Purpose===
===Purpose===
Finds the index of the array element closest to value r.
Finds the index of the array element closest to value r.
===Synopsis===
===Synopsis===
:index = findindx(array,r)
:index = findindx(array,r)
===Description===
===Description===
Inputs are an array of values (array) and a value to locate (r). Output (index) is the linear index into array which will return the closest value to r.
Inputs are an array of values (array) and a value to locate (r). Output (index) is the linear index into array which will return the closest value to r.
===Examples===
===Examples===
index = findindx(array,r);      %get an index
index = findindx(array,r);      %get an index
nearest_value = array(index);    %find the value
nearest_value = array(index);    %find the value
===See Also===
===See Also===
[[lamsel]]
[[lamsel]]

Revision as of 15:25, 3 September 2008

Purpose

Finds the index of the array element closest to value r.

Synopsis

index = findindx(array,r)

Description

Inputs are an array of values (array) and a value to locate (r). Output (index) is the linear index into array which will return the closest value to r.

Examples

index = findindx(array,r); %get an index

nearest_value = array(index); %find the value

See Also

lamsel