Re: how to replace a list of variables
- To: mathgroup at smc.vnet.net
- Subject: [mg14055] Re: [mg14017] how to replace a list of variables
- From: "Jens-Peer Kuska" <kuska at linmpi.mpg.de>
- Date: Fri, 18 Sep 1998 03:50:37 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Hi Shin-Ying,
can You explain what Your input mean ? The input
FindRoot[{x+y==10,x==y},{x,3},{y,3}] {{x->5,y->5}}
is due to the Mathematica manual interpreted as
Times[FindRoot[{x+y==10,x==y},{x,3},{y,3}], {{x->5,y->5}}]
and You get
{{x->5,y->5}}*{x->5.,y->5.}
that can not be used as an replacement rule and gives various errors. In
the case that You mean
FindRoot[{x+y==10,x==y},{x,3},{y,3}];{{x->5,y->5}}
that is (CompoundExpression[FindRoot[{x+y==10,x==y},{x,3},{y,3}],
{{x->5,y->5}}])
You must simply type it to get the correct result.
Hope that helps
Jens
-----Original Message-----
From: Shih-Ying Wu <wus at econ.lsa.umich.edu> To: mathgroup at smc.vnet.net
Subject: [mg14055] [mg14017] how to replace a list of variables
>Hi, I just got emails discussing how to assign a solution to a variable.
>However, the same approach doesn't work for the following similar
>question, in which the solution is a vector.
>
>FindRoot[{x+y==10,x==y},{x,3},{y,3}] {{x->5,y->5}}
>{x,y}={x,y}/.%
>
>Thanks.
>
>Shih-ying Wu
>
>
>
>