[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to extract sequenced data from an array?
From: |
Sergei Steshenko |
Subject: |
Re: How to extract sequenced data from an array? |
Date: |
Wed, 22 Dec 2010 09:23:48 -0800 (PST) |
--- On Wed, 12/22/10, new_user <address@hidden> wrote:
> From: new_user <address@hidden>
> Subject: Re: How to extract sequenced data from an array?
> To: address@hidden
> Date: Wednesday, December 22, 2010, 6:49 AM
> > 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
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
Do you know the period ?
Regards,
Sergei.
- Re: How to extract sequenced data from an array?, (continued)
- 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
- Re: How to extract sequenced data from an array?, Doug Stewart, 2010/12/22
- Re: How to extract sequenced data from an array?, Francesco Potortì, 2010/12/23
- Re: How to extract sequenced data from an array?,
Sergei Steshenko <=
- 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?, Przemek Klosowski, 2010/12/22
- Re: How to extract sequenced data from an array?, Kim Hansen, 2010/12/31
- Re: How to extract sequenced data from an array?, Ghostly, 2010/12/31
Re: How to extract sequenced data from an array?, veryhappy, 2010/12/23