Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

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?
>


  • Prev by Date: horizontal cylinder
  • Next by Date: Cause of $ErrorLink message in EXCEL/Mathematica
  • Previous by thread: DO if Loop
  • Next by thread: Re: DO if Loop