Programmer Guide/Command Reference/EVAL/imin: Difference between revisions

From STX Wiki
Jump to navigationJump to search
m (1 revision: Initial import)
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
=====imin=====
Returns the index of smallest value of argument x.


nThe index of the minimum element in the vector <var>x</var>.
;Usage: '''<code>imin(<var>x</var>)</code>'''


{|
;Result: The result is the index of the minimum value of <var>x</var>.
|-
::*if <var>x</var> is a scalar: the result is '''0'''
|Usage:
::*if <var>x</var> is a vector: the result is the index (row) of the minimum
|imi(x)
::*if <var>x</var> is a matrix: the result is the element index ''i'' of the minimum; the row is <code>int(''i''/nrow(''x''))</code> and column is <code>''i'' % nrow(''x'')</code>
|-
|Result type:
 
|scalar
;See also: [[Programmer_Guide/Command_Reference/EVAL/min|min]], [[Programmer_Guide/Command_Reference/EVAL/absmin|absmin]], [[Programmer_Guide/Command_Reference/EVAL/max|max]],
|}
 
[[Programmer_Guide/Command_Reference/EVAL#Functions|<function list>]]

Revision as of 10:32, 4 April 2011

Returns the index of smallest value of argument x.

Usage
imin(x)
Result
The result is the index of the minimum value of x.
  • if x is a scalar: the result is 0
  • if x is a vector: the result is the index (row) of the minimum
  • if x is a matrix: the result is the element index i of the minimum; the row is int(i/nrow(x)) and column is i % nrow(x)


See also
min, absmin, max,

<function list>

Navigation menu

Personal tools