MathGroup Archive 2002

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

Search the Archive

Re: Variable number of parameters

  • To: mathgroup at
  • Subject: [mg33330] Re: [mg33300] Variable number of parameters
  • From: BobHanlon at
  • Date: Sat, 16 Mar 2002 01:40:07 -0500 (EST)
  • Sender: owner-wri-mathgroup at

In a message dated 3/14/02 7:58:44 AM, 
Sven.Richter at writes:

>But how does it look like, if I want to define e.g. something like
>Table[{m1, m2,..., m(n-1),mn=maxVal-m1-...-m(n-1)},
>{m1, minVal, maxVal-(n-1)minVal, step},
>{m2, minVal,maxVal-(n-2)minVal-m1, step}, ...,
>{m(n-1), minVal,  maxVal-minVal-m1-...-m(n-2), step}] ?
>Do you know what I mean?

Perhaps this is what you want

n=5; minVal=3; maxVal=19; step=2;


lst = Append[var, maxVal-(Plus@@var)];

Table[lst, Evaluate[Sequence@@
          maxVal-(n-k)*minVal-(Plus@@Take[var, k-1]),

Bob Hanlon
Chantilly, VA  USA

  • Prev by Date: Re: symbolic solution (ArcTan)
  • Next by Date: Re: Solve fails
  • Previous by thread: Re: Variable number of parameters
  • Next by thread: RE: Variable number of parameters