[Date Index]
[Thread Index]
[Author Index]
Re: defining a function of functions
*To*: mathgroup at smc.vnet.net
*Subject*: [mg110467] Re: defining a function of functions
*From*: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
*Date*: Sun, 20 Jun 2010 03:43:48 -0400 (EDT)
*References*: <hviav7$hbl$1@smc.vnet.net>
Dear JD,
You could pass f to innerprod as f[2, #] & and it should work.
Cheers -- Sjoerd
On Jun 19, 1:51 pm, J Davis <texasauti... at gmail.com> wrote:
> I want to define an inner product function such as
>
> (here mylist is a specified list and L is a specified constant)
>
> innerprod[f_, g_] = Sum[f[k]Conjugate[g[k]]Part[mylist,k],{k,1,L}]
>
> This works fine but now I need to apply it in a situation where f is a
> function of 2 variables while g is a function of only one variable,
> i.e. I want to compute something like the inner product of f[2,n] and
> g[n].
>
> Of course, I want the ability to freely vary the first input of f.
>
> I have accomplish this before rather easily but I'm presently drawing
> a blank.
>
> Thanks for your help.
>
> Best,
> JD
Prev by Date:
**Re: color legend**
Next by Date:
**Setting PageSize and PaperSize**
Previous by thread:
**defining a function of functions**
Next by thread:
**Re: defining a function of functions**
| |