MathGroup Archive 2009

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

Search the Archive

Re: Defining function with indexed variables


How about

f[] = 0;
f[x__] := {x}.{x}

The first line is optional.

Bobby

On Sat, 02 May 2009 04:58:57 -0500, Paul Smith <phhs80 at gmail.com> wrote:

> Dear All,
>
> How can one define the function
>
> f(x1,x2,...,x100) := x1^2 + x2^2 + ... + x100^2
>
> using superscripts?
>
> Thanks in advance,
>
> Paul
>



-- 
DrMajorBob at bigfoot.com


  • Prev by Date: Re: Re: HoldForm in defined function doesn't seem to work
  • Next by Date: Re: Defining function with indexed variables
  • Previous by thread: Defining function with indexed variables
  • Next by thread: Re: Defining function with indexed variables