MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: For to Map to Increase Speed

  • To: mathgroup at
  • Subject: [mg53262] Re: [mg53235] For to Map to Increase Speed
  • From: Yasvir Tesiram <tesiramy at>
  • Date: Mon, 3 Jan 2005 04:29:40 -0500 (EST)
  • References: <>
  • Sender: owner-wri-mathgroup at

In as much as Map may help you speed things up, the problem as stated is

> Is there a Map routine that can shorten the computation time of data to
> data02?
> The variable data is a list of 1036 lists within which are lists of
> sublists of 1 or more, usually more.
> I cannot flatten data because I need to keep the groupings (1036)  that was
> created by Split.
> Dimensions[data]
> {1036}

This suggests that data is already Flat. There are no sublists. Are you
operating on Strings?

> data02={};
> n=Length[data]+1;
> For[i=1,i<n,i++,step1=Mean[ColumnTake[data[[i]],{4,21}]];

The above is ill-formed. In any case data[[i]] simply becomes the ith
element of the list pointed to by the variable data and since there are no
columns to take the rest of it would return an error.

> AppendTo[data02,Join[data[[i,1,{1,2}]],step1]]]
> Dimensions[data02]
> {1036,20}

I don't know how you got this. To answer your question though, yes it is
possible to use Map and there may be other ways to go about operating on
the data. If you can, try and make a short synthetic example and post


  • Prev by Date: Re: Simple Fourier help
  • Next by Date: Strange bug
  • Previous by thread: For to Map to Increase Speed
  • Next by thread: Re: For to Map to Increase Speed