Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

Re: Re: Help Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54926] Re: [mg54897] Re: [mg54852] Help Mathematica
  • From: Mitch.Stonehocker at sungard.com
  • Date: Sun, 6 Mar 2005 00:56:27 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

In[1]:=
lst={x1,x2,x3};

In[2]:=
params=Pattern[#,Blank[]]&/@lst;

In[3]:=
f[params]=Plus@@lst;

In[4]:=
f[{1,2,3}]

Out[4]=
6


Cheers,

Mitch Stonehocker




-----Original Message-----
From: Bob Hanlon [mailto:hanlonr at cox.net]
To: mathgroup at smc.vnet.net
Subject: [mg54926] [mg54897] Re: [mg54852] Help Mathematica


Map[Pattern[#,Blank[]]&,{x1,x2,x3}]

{x1_,x2_,x3_}

Pattern[#,Blank[]]&/@{x1,x2,x3}

{x1_,x2_,x3_}

#_&/@{x1,x2,x3}

{x1 _,x2 _,x3 _}


Bob Hanlon

> 
> From: robynobile at gmail.com (Awgn78)
To: mathgroup at smc.vnet.net
> Date: 2005/03/04 Fri AM 05:07:48 EST
> To: mathgroup at smc.vnet.net
> Subject: [mg54926] [mg54897] [mg54852] Help Mathematica
> 
> How i can obtain a list {x1_,x2_,x3_} from a list {x1, x2, x3}...
> thank you for help and sorry for my bad english...i'm italian
> 
> 


  • Prev by Date: Re: repeating elements in a list
  • Next by Date: Re: How to match/balance parenthesis?
  • Previous by thread: Re: Help Mathematica
  • Next by thread: Importing HTML tables