Path: news.mathworks.com!not-for-mail
From: "David " <dave@bigcompany.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Undefined function - min/max
Date: Tue, 8 Apr 2008 17:25:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 24
Message-ID: <ftg9ph$3vs$1@fred.mathworks.com>
References: <ftg8re$akl$1@fred.mathworks.com>
Reply-To: "David " <dave@bigcompany.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1207675505 4092 172.30.248.37 (8 Apr 2008 17:25:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 8 Apr 2008 17:25:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 791003
Xref: news.mathworks.com comp.soft-sys.matlab:461803


"susan " <suetibu@hotmail.com> wrote in message 
<ftg8re$akl$1@fred.mathworks.com>...
> Hi! I keep getting an error while trying to run code 
with 
> this:
> 
> mindata=min(data);
> 
> The error is "Undefined function or variable "min"."
> 
>  The same error happens with max. Everything else in the 
> code works.I can run this from command line though!

how about an example?  sometimes you can find the problem 
when trying to cut the code down to the shortest section 
that reproduces the problem so you can post it, preferably 
no more than a half dozen lines or so.

maybe put a 'which min' and 'whos min' just before the 
error line.  or use the debugger to stop on error and then 
do the which and whos command to see what it thinks 'min' 
really means at that point.