MathGroup Archive 2010

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

Search the Archive

Re: Mathematica- Use a previous equation into the function Function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg111455] Re: Mathematica- Use a previous equation into the function Function
  • From: Sseziwa Mukasa <mukasa at jeol.com>
  • Date: Mon, 2 Aug 2010 07:03:53 -0400 (EDT)


On Aug 1, 2010, at 4:58 AM, Camille <camille.segarra at gmail.com> wrote:

> Dear All,
>
> I am fairly new to mathematica. I am stuck with a problem I cannot solve.=
 I would like to call a previous equation into the function Function. If a =
type directly the expression or copy paste it, it works. However, when I ca=
ll the expression by its name it does not.
> Here is the code for a more precise explanation:
>
> In: ll
> Out: d + a x + h x^2 + b y + e x y + c z + j z^2
>
> In: Function[##, a x + b y + c z + d + e x y + h x^2 + j z^2] & @@ {Listp=
}
> Out: Function[{a, b, c, d, e, h, j},
> a x + b y + c z + d + e x y + h x^2 + j z^2]
>
> It works well and I can use it to generate as many equations I want by re=
placing the variables a,b,c,d,e,h,j.
> But if I do:
>
> In:Function[##, ll] & @@ {Listp}
> Out:Function[{a, b, c, d, e, h, j}, ll]
>
> And I cannot use it.
>
> Any suggestions?

Use evaluate, Function[##,Evaluate[ ll]]& @@ {Listp}

Regards,
Ssezi
>


  • Prev by Date: Re: Kernels dying on parallel code
  • Next by Date: Re: different results for Standard vs Prefix forms
  • Previous by thread: Re: Mathematica- Use a previous equation into the function Function
  • Next by thread: Re: Mathematica- Use a previous equation into the function Function