valpos

From DavinciWiki
Jump to: navigation, search


64-bit SafeYes

Description

Find the position of elements in an array containing values closest to a specified value.

Arguments and Return Values

Arguments:A numeric array and desired numeric value

Return Value: A 3xNx1 INT array containing the x,y and z positions.

Usage

Syntax: valpos(data=VAL, value=VAL[, iter=INT][, ignore=VAL][, showval=INT])

'data' - Any numeric array

'value' - The desired numeric value

'iter' - Number of occurences desired

'ignore' - Optional value to ignore when searching values.

'showval' - An optional flag to return the values in a 4xNx1 FLOAT array.

Examples

dv> a
345x500x10 array of float, bsq format [6,900,000 bytes]
dv> valpos(a,value=0.12)
3x1x1 array of int, bsq format [12 bytes]
12       238       4

dv> valpos(a,0.12,showval=1)
3x1x1 array of int, bsq format [12 bytes]
12.0000 238.000 4.00000 0.119998

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Related Functions

Recent Core Changes

Modified On: 07-06-2009

Personal tools