Functions of Arrays
- To: mathgroup at smc.vnet.net
- Subject: [mg102590] Functions of Arrays
- From: zak <u.gotzes at googlemail.com>
- Date: Sun, 16 Aug 2009 06:39:22 -0400 (EDT)
Functions can be defined via f[x1_, x2_] := x1^2 + x2^2 in Mathematica. But how can I manage it to define a function depending on an array? I would like to do something like Array[x,2] f[x[1]_,x[2]_]:=x[1]^2+x[2]^2 because the length of the array varies in my application.
- Follow-Ups:
- Re: Functions of Arrays
- From: Leonid Shifrin <lshifr@gmail.com>
- Re: Functions of Arrays
- From: Patrick Scheibe <pscheibe@trm.uni-leipzig.de>
- Re: Functions of Arrays
- From: DrMajorBob <btreat1@austin.rr.com>
- Re: Functions of Arrays