Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Find elements bigger than a threshold value in "external" elements of a 3D matrix

Subject: Find elements bigger than a threshold value in "external" elements of a 3D matrix

From: Javier

Date: 26 Jul, 2013 08:57:07

Message: 1 of 2

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

Subject: Find elements bigger than a threshold value in "external" elements

From: dpb

Date: 26 Jul, 2013 12:54:02

Message: 2 of 2

On 7/26/2013 3:57 AM, Javier wrote:
...

> 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)
...

So, what about the "last" plane and the edges (first/last rows/columns)
of the remaining planes after those are removed--are they in or out?

The form of the question should give you a pretty good hint about how to
solve the problem, though...

--

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us