Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Minimum Value
Date: Wed, 20 Aug 2008 09:58:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 28
Message-ID: <g8gpr9$4u8$1@fred.mathworks.com>
References: <g8fiqh$1q0$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1219226282 5064 172.30.248.35 (20 Aug 2008 09:58:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 20 Aug 2008 09:58:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 791003
Xref: news.mathworks.com comp.soft-sys.matlab:486394



"Raju Gain" <supernova5271@yahoo.com> wrote in message 
<g8fiqh$1q0$1@fred.mathworks.com>...
> Hi,
> 
> I have a variable which is an array of all positive 
> numbers. I am trying to find the minimum value in the 
> varibale other than zero. Can anyone suggest how I can 
do 
> this? I was using the min() function before.
> 
> Thanks for your time.
> 

maybe something like:

>> a=[0 1 2 3 4 5]

a =

     0     1     2     3     4     5

>> min(a(a>0))

ans =

     1

>>