Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*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 2000

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

Search the Archive

Re: powersum with a function with variable count of parameters

  • To: mathgroup at smc.vnet.net
  • Subject: [mg25296] Re: powersum with a function with variable count of parameters
  • From: Mark Fisher <mark.fisher at atl.frb.org>
  • Date: Tue, 19 Sep 2000 03:45:18 -0400 (EDT)
  • Organization: Federal Reserve Bank of Atlanta
  • References: <8q22cs$hr0@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

How about f[x_, xi__] := 10^x + Plus @@ (10^{xi})?

f[a,b,c] -> 10^a + 10^b + 10^c


Klamser wrote:
> 
> Hi,
> 
> how can I write a function f[x_,xi__]=10^x+10^xi, that returns
> f[1,2,3]->10^1+10^2+10 ^3.
> 
> When i use the above definition, I only get
> 
> 10^1+10^2^3
> 
> But I want to get
> 
> 10^1+10^2+10 ^3
> 
> Regrads, Peter


-- Mark
Mark Fisher
Economic Advisor
Research Department
Federal Reserve Bank of Atlanta
Atlanta, GA 30303
404-521-8757 (voice)
404-521-8810 (fax)
mark.fisher at atl.frb.org

personal web page: www.markfisher.net


  • Prev by Date: Re: Newbie question
  • Next by Date: Re: Re: powersum with a function with variable count of parameters
  • Previous by thread: Re: powersum with a function with variable count of parameters
  • Next by thread: Animate multiple listplots