Re: Simple Question about extracting certain values from a matrix



On Nov 30, 1:04 pm, rober...@xxxxxxxxxxxxxxxxxx (Walter Roberson)
wrote:
In article <c4f8d1aa-f0ed-449b-a849-768c8e024...@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,

Lazyrussian <lazyruss...@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

Thanks to the both of you. I will try the any function momentarily.
.



Relevant Pages

  • Re: Simple Question about extracting certain values from a matrix
    ... Lazyrussian wrote: ... but before I do so I need to get rid of a discrepancy ... -- Rich Kulawiec ...
    (comp.soft-sys.matlab)
  • Re: igawk - gawk discrepancy
    ... there is the following discrepancy. ... but the need for this feature has to do with any program or utility that generates AWK code and wants to take advantage of @include. ... attached a patch for this problem against gawk-devel (CVS version). ... The patch should be POSIX-compliant. ...
    (comp.lang.awk)
  • Simple Question about extracting certain values from a matrix
    ... I am trying to find the center of mass (using ... but before I do so I need to get rid of a discrepancy ... How do I tell matlab to only display each coordinate once (so if 200 ...
    (comp.soft-sys.matlab)