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

• To: mathgroup at smc.vnet.net
• Subject: [mg111463] Re: Mathematica- Use a previous equation into the function Function
• From: Prajwal <prajwalosti at gmail.com>
• Date: Mon, 2 Aug 2010 07:05:21 -0400 (EDT)
• References: <i33cvi\$87q\$1@smc.vnet.net>

```On Aug 1, 11:58 am, Camille <camille.sega... 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?
>
> Thanks in advance. Do not hesitate to post if you need some further infor=
mation. Sorry for my bad english.
>
> Camille

Since the function "Function" has HoldAll attribute, the expressions
in its arguments are not evaluated by default.Try:

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

--
Prajwal

```

• Prev by Date: Re: different results for Standard vs Prefix forms
• Next by Date: A distribution problem using Mathematica
• 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
{"ft_lang_label":"__label__en","ft_lang_prob":0.71293795,"math_prob":0.9233649,"size":1505,"snap":"2019-35-2019-39","text_gpt3_token_len":488,"char_repetition_ratio":0.115256496,"word_repetition_ratio":0.16828479,"special_character_ratio":0.35747507,"punctuation_ratio":0.20111732,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99772084,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],"im_url_duplicate_count":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-08-26T10:26:29Z\",\"WARC-Record-ID\":\"<urn:uuid:c36b278f-8a2a-462c-bcea-4b97e5025813>\",\"Content-Length\":\"42866\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:ec7a7d1f-aa62-4e69-87a1-27fd671e9d57>\",\"WARC-Concurrent-To\":\"<urn:uuid:9f188720-47ee-4676-8228-3c6e6fba3371>\",\"WARC-IP-Address\":\"140.177.205.73\",\"WARC-Target-URI\":\"http://forums.wolfram.com/mathgroup/archive/2010/Aug/msg00037.html\",\"WARC-Payload-Digest\":\"sha1:S7GXPKCEE2N5OAXBGKULWZV6XFOHZPSD\",\"WARC-Block-Digest\":\"sha1:AQ5RHQQESNKS2TBKTJXCMV5LAWLIPLAH\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-35/CC-MAIN-2019-35_segments_1566027331485.43_warc_CC-MAIN-20190826085356-20190826111356-00008.warc.gz\"}"}