help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding the index of the smallest value in a vector


From: Miquel Cabanas
Subject: Re: Finding the index of the smallest value in a vector
Date: Thu, 18 Nov 2004 09:31:06 +0100
User-agent: Mutt/1.3.28i

hi,

On Thu, Nov 18, 2004 at 09:16:03AM +0100, Ploett Norbert wrote:
> 
> I need to find a function that returns the index of the smallest value in a
> vector. How do I go about this? I.e. is there a handy function that I do not
> know of?
> 
> find() does not seem to do exactly what I want.
> 

min() is what you're looking for.

According to the documentation (see 'help min'),

"... called with two output arguments, also returns the index of
the minimum value(s) ..."


Miquel


-- 
Miquel E Cabanas ------------------------------------------------------
SeRMN, Universitat Autonoma de Barcelona (address@hidden)
------------------------------------------o-oo--ooo---ooo--oo-o--------



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]