help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to extract sequenced data from an array?


From: new_user
Subject: Re: How to extract sequenced data from an array?
Date: Wed, 22 Dec 2010 14:23:11 +0100

Hello Ben,

Wednesday, December 22, 2010, 1:43:27 PM, you wrote:

> 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

Sorry if my English is bad, but if example array isn't clear to read:
I want unique sequence, not unique values - I want whole part of the
array that is repeating:

A B C D D D A B C D D D A B C D D D
|_________| |_________| |_________|
     |           |           |
   unique      unique      unique
  sequence    sequence    sequence
    data        data        data

I also tried your suggestion, which I suspect returns unique values,
plus I want to process 2 dimensional array and get 2 dimensional array

Thanks for your reply

PS Apologies Ben, for replying to your own address



reply via email to

[Prev in Thread] Current Thread [Next in Thread]