Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: Speed Up Routines

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109392] Re: Speed Up Routines
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Sat, 24 Apr 2010 04:04:01 -0400 (EDT)

What kind of data is stored in "data" and "cntrlUnits"?

What are the dimensions and data type of "headings02"?

Could we see a short example of each?

Without any of that, how can we tell what you're trying to accomplish?

Bobby

On Fri, 23 Apr 2010 02:49:23 -0500, Benedetto Bongiorno  
<bongiob at sbcglobal.net> wrote:

> Mathgroup,
>
>
> I have the following routines that take approx 5 minutes.
>
> Can you give me suggestions to implement MAP in the areas of For
>
>
> Length[data]
>
> 370161
>
> Length[cntrlUnits}
>
> 456
>
>
> n=Length[cntrlUnits]+1;
>
> cntrlUnitsData=Table[0,{i,1,Length[cntrlUnits]}];
>
> For[i=1,i<n,i++,cntrlUnitsData[[i]]=Position[data[[All,Flatten[Position[head
> ings02,"GLICU"]][[1]]]],_?(#==cntrlUnits[[i]]&)]];
>
>
> Length[cntrlUnitsData]
>
> 456
>
>
> n=Length[cntrlUnits]+1;
>
> cntrlUnitsTrans=Table[0,{i,1,Length[cntrlUnits]}];
>
> For[i=1,i<n,i++,cntrlUnitsTrans[[i]]=Map[data[[#]]&,cntrlUnitsData[[i]]]];
>
>
> Length[cntrlUnitsTrans]
>
> 456
>
>
> Thank you,
>
>
> Benedetto Bongiorno CPA CRE
>
> Cell 214-707-6546
>
> Land 972-470-9138
>
> Fax 972-470-9748
>
> bongiob at sbcglobal.net
>
>
> This Email is covered by the Electronic Communications Privacy Act, 18
> U.S.C. Sections 2510-2521 and is legally privileged. The information
> contained in this Email is intended only for the use of the individual
> or entity named above. If the reader of this message is not the intended
> recipient, you are hereby notified that any dissemination, distributions
> or copying of this communication is strictly prohibited. If you have
> received this communication in error, please notify sender.
>
>


-- 
DrMajorBob at yahoo.com


  • Prev by Date: Re: Unevaluated functions
  • Next by Date: Re: problems with NMinimize
  • Previous by thread: Speed Up Routines
  • Next by thread: Re: Speed Up Routines