Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: find elements to include page indices
Date: Wed, 23 Jul 2008 09:38:56 -0400
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <g67c9g$lsl$1@fred.mathworks.com>
References: <g677t2$j92$1@fred.mathworks.com>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1216820336 22421 144.212.105.187 (23 Jul 2008 13:38:56 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 23 Jul 2008 13:38:56 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Original
Xref: news.mathworks.com comp.soft-sys.matlab:481220




"Dave Brackett" <davebrackett@hotmail.com> wrote in message 
news:g677t2$j92$1@fred.mathworks.com...
>I have a matrix of size [1,16,50] and want to find the
> positions of the non-zero and zero elements within.
>
> I have been using find but this only either gives linear
> indices or row and column indices. I want it to include page
> indices.
>
> I'm sure this is quite simple to do but I can't seem to work
> it out. Any help would be appreciated. Thanks.

Use FIND to obtain the linear indices then use IND2SUB to convert them into 
row, column, and page subscripts.

-- 
Steve Lord
slord@mathworks.com