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: 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.


      



reply via email to

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