Re: DO if Loop
- To: mathgroup at smc.vnet.net
- Subject: [mg26643] Re: [mg26593] DO if Loop
- From: BobHanlon at aol.com
- Date: Sat, 13 Jan 2001 22:36:19 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
var = Array[a, {6, 3}]; If the function's input is a vector, use one of these forms f /@ var == (f[#] &) /@ var == Thread[f[var]] True If the function's input is a sequence, use one of these forms f @@@ var == Apply[f, var, {1}] == (f[#[[1]], #[[2]], #[[3]]] & ) /@ var == (f[Sequence @@ #1] & ) /@ var == MapThread[f, Transpose[var]] True Bob Hanlon In a message dated 2001/1/11 11:14:27 AM, pixelpounder at earthlink.net writes: >I have a matrix function and a list of 2622 variables in groups of 3. >I need to apply this function to each set of 3 variables continuing until >finished with the list. > >How is this done? >