Re: Simple Question about extracting certain values from a matrix



In article <c4f8d1aa-f0ed-449b-a849-768c8e024ca8@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Lazyrussian <lazyrussian@xxxxxxxxx> wrote:

I have a 3D Matrix. I am trying to find the center of mass (using
binary values), but before I do so I need to get rid of a discrepancy
- well maybe not a discrepancy, but I want to do the following:

Remove duplicate values in each dimension.

For instance, say I have a bunch of ones scattered around this matrix,
but in a few instances their are a lot of 1s located in the 200th
column but on different rows.

How do I tell matlab to search my matrix for any values that appear
more than once, and remove all them.


I suggest using any()

find(any(ITV>0))
--
"Any sufficiently advanced bug is indistinguishable from a feature."
-- Rich Kulawiec
.



Relevant Pages