[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to extract sequenced data from an array?
From: |
Ben Abbott |
Subject: |
Re: How to extract sequenced data from an array? |
Date: |
Wed, 22 Dec 2010 07:43:27 -0500 |
On Dec 22, 2010, at 4:39 AM, new_user wrote:
> Hi,
> having sequenced data array I would like to extract it's unique part.
>
> Let's consider this simple array:
>
> X =
> 1 2
> 1 2
> 2 2
> 3 1
> 2 3
> 1 2
> 1 2
> 2 2
> 3 1
> 2 3
> 1 2
> 1 2
> 2 2
> 3 1
> 2 3
>
> {...}
>
> I would like to get:
>
> Y =
> 1 2
> 1 2
> 2 2
> 3 1
> 2 3
>
> as a result.
>
> Thanks for your time
I don't understand what is unique about the result you'd like to get.
It looks to me like Y is identical to X, but truncated to 5 rows, Y = X(1:5,:)
Assuming you'd like to find the unique values for each column of x ...
cellfun (@unique, mat2cell (X, rows(X), ones(1,columns(X))),
"uniformoutput", false)
Ben
- How to extract sequenced data from an array?, new_user, 2010/12/22
- Re: How to extract sequenced data from an array?,
Ben Abbott <=
- Re: How to extract sequenced data from an array?, Sergei Steshenko, 2010/12/22
- Re: How to extract sequenced data from an array?, new_user, 2010/12/22
- Re: How to extract sequenced data from an array?, Ben Abbott, 2010/12/22
- Re: How to extract sequenced data from an array?, new_user, 2010/12/22
- Re: How to extract sequenced data from an array?, Andy Buckle, 2010/12/22
- Re: How to extract sequenced data from an array?, new_user, 2010/12/22
- Re: How to extract sequenced data from an array?, Doug Stewart, 2010/12/22
- Re: How to extract sequenced data from an array?, Andy Buckle, 2010/12/22
- Re: How to extract sequenced data from an array?, fork, 2010/12/22