minpos

From DavinciWiki
(Difference between revisions)
Jump to: navigation, search
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{DavinciWiki_Function|
 
{{DavinciWiki_Function|
Find the position of the minimum value in an array
+
Find the position of the minimum value in an array.
 
|
 
|
 
Arguments: A numeric array
 
Arguments: A numeric array
 
   
 
   
Return Value: A structure containing the minimum value and position
+
Return Value: A 3x1x1 INT array containing the [x,y,z] position of the minimum value
 
|
 
|
Syntax: thm.minpos(VAL, [ignore=VAL], [ret=BOOL])
+
[[Syntax]]: minpos(data=VAL[, iter=INT][, ignore=VAL][, gt=VAL][, showval=INT])
 +
 +
'data' - Any numeric array
 +
 +
'iter' - Number of lowest values desired
 
   
 
   
 
'ignore' - The value to ignore while searching for maximum value.
 
'ignore' - The value to ignore while searching for maximum value.
 
   
 
   
'ret' - Set to 1 will return a structure containing value and position data.  
+
'gt' - Search for a minimum value above this 'greater than' value.
 +
 
 +
'showval' - Optional flag to return a 4xNx1 FLOAT array containing the value of the element.
 
|
 
|
 
  dv> a
 
  dv> a
 
  345x500x10 array of float, bsq format [6,900,000 bytes]
 
  345x500x10 array of float, bsq format [6,900,000 bytes]
  
  dv> thm.minpos(a)
+
  dv> minpos(a)
   
+
  3x1x1 array of int, bsq format [12 bytes]
Location: 58,471,1
+
  1       1      1
  0.000043186
+
+
dv> thm.minpos(a,ret=1)
+
 
   
 
   
  Location: 58,471,1
+
  dv> minpos(a,gt=2)
  0.000043186
+
3x1x1 array of int, bsq format [12 bytes]
 +
  3      1      1
 
   
 
   
  struct, 2 elements
+
  dv> minpos(a,iter=2)
    pos: 3x1x1 array of int, bsq format [12 bytes]
+
3x2x1 array of int, bsq format [24 bytes]
    val: 4.31861e-05
+
1      1      1
 +
1      2      2
 
|
 
|
 
|
 
|
 
|
 
|
*[[thm.maxpos]]
+
*[[maxpos]]
 
*[[min]]
 
*[[min]]
 
*[[minchan]]
 
*[[minchan]]
 +
*[[valpos]]
 
|
 
|
 
|
 
|
 +
1.71
 
}}
 
}}
 
[[category:Functions]]
 
[[category:Functions]]
[[category:Modules]]
+
[[category:Davinci Core]]
 
[[category:Matrix]]
 
[[category:Matrix]]
 +
[[category:64-bit]]

Latest revision as of 10:50, 6 July 2009



64-bit SafeYes

Description

Find the position of the minimum value in an array.

Arguments and Return Values

Arguments: A numeric array

Return Value: A 3x1x1 INT array containing the [x,y,z] position of the minimum value

Usage

Syntax: minpos(data=VAL[, iter=INT][, ignore=VAL][, gt=VAL][, showval=INT])

'data' - Any numeric array

'iter' - Number of lowest values desired

'ignore' - The value to ignore while searching for maximum value.

'gt' - Search for a minimum value above this 'greater than' value.

'showval' - Optional flag to return a 4xNx1 FLOAT array containing the value of the element.

Examples

dv> a
345x500x10 array of float, bsq format [6,900,000 bytes]
dv> minpos(a)
3x1x1 array of int, bsq format [12 bytes]
1       1       1

dv> minpos(a,gt=2)
3x1x1 array of int, bsq format [12 bytes]
3       1       1

dv> minpos(a,iter=2)
3x2x1 array of int, bsq format [24 bytes]
1       1       1
1       2       2

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