Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Find elements bigger than a threshold value in "external" elements of a 3D matrix
Date: Fri, 26 Jul 2013 08:57:07 +0000 (UTC)
Organization: CEIT - Univ de Navarra
Lines: 31
Message-ID: <kstdl3$3t1$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1374829027 4001 172.30.248.47 (26 Jul 2013 08:57:07 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 26 Jul 2013 08:57:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 4367467
Xref: news.mathworks.com comp.soft-sys.matlab:799944

Hi guys,

I was wondering if someone could help me come up with a code for a 3D image I'm working on wright now.

I've got a simple 3D matrix:

A(:,:,1) =

     0     7     4
     0     32   9
     4     3     1

A(:,:,2) =

     6     0     4
     3     4     6
     2     3    11

A(:,:,3) =

    12     2     4
    10     20   6
    14     3     2

I would like to find those values that are bigger than a threshold value (for example biger than 7). However I only want those that are exterior elements, that is, not "central" elements (the 32 on the first layer of the matrix shouldn't be marked as a maximum)

(I'm working with a bigger matrix but I guess that once I'm able to do this for the small 3D matrix from above, it won't be difficult to do it for larger ones).

Thank you a lot,

a Spanish student