Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: isfinite to find max w/o including Inf
Date: Tue, 28 Oct 2008 17:42:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 16
Message-ID: <ge7ita$jdd$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1225215722 19885 172.30.248.37 (28 Oct 2008 17:42:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 28 Oct 2008 17:42:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1551459
Xref: news.mathworks.com comp.soft-sys.matlab:497679


Could someone please tell me whats wrong with my code?

h = MTT{m}(MSchJ{m}(end),:);
MAXP = [MAXP; max(h(isfinite(MTT{m}(MSchJ{m}(end),:)),1))];

This is the error I get:

??? Index exceeds matrix dimensions.

Error in ==> SAPSLMETARAPS at 197
            MAXP = [MAXP; max(h(isfinite(MTT{m}(MSchJ{m}(end),:)),1))];


Thanks,

Diego