|
Wrighty43 Wright wrote:
> Hopefully someone can suggest a very simple solution that i
> have overlooked.
> I have a 3d array with values as follows: >
> ans(:,:,1) =
> 19.0000 0
> 17.0000 29.9666
> 18.0000 31.5595
...
> 45.0000 9.1104
> ans(:,:,3) =
> 19.0000 0
> 18.0000 12.4499
...
>
> I need to find out if any numbers in the first coloumn are repeated
> in other coloumns, for example 18,17,42 are all repeated. So i
> would like something that would tell me this in the form of a position
> (so i can extract the corresponding data in the second coloumn)....
> AND to make it more complex i need to kno if the number is repeated
> twice or three times (so 18,17 are both repeated 3 times, and 42
> twice)....
>> m=unique(b(:,1,1));
>> ismember(b(:,1,2:3),m)
ans(:,:,1) =
1
1
0
1
0
ans(:,:,2) =
1
1
0
0
1
>>
--
|