[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 15:49:40 +0100 |
> Someone with expertise in signal processing may have a solution,
> that is more efficient with time and/or memory.
> function y = period (x)
> r = rows(x);
> p = 0;
> a = [];
> while (p < r && ! isequal (x, a))
> p = p + 1;
> y = x(1:p,:);
> a = repmat (y, ceil (r/p), 1)(1:r,:);
> endwhile
> endfunction
> Ben
Thanks for the function, I had similar thoughts but curious if there is some
easy way to this
Maybe I should have said about amount of data in question: 10^7 to 10^8
elements, and unique sequence consists of maximum 10^6 elements, usually less
like 10^5
I run the function on array with 3071488 rows and after half hour I terminated
octave process :D
- 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?, 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 <=
- 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
- Re: How to extract sequenced data from an array?, new_user, 2010/12/22
- Re: How to extract sequenced data from an array?, fork, 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?, new_user, 2010/12/22