MathGroup Archive 1998

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

Search the Archive

RE: how to replace a list of variables


Hi,

{x,y} is not a valid name for a variable. You can assign: v={x,y} /. %
then access v[[1]] and v[[2]], or individually x=x /. %
y=y /. %%

Regards - Daniel CLEMENT

> ----- Original Message -----
> From:	Shih-Ying Wu [SMTP:wus at econ.lsa.umich.edu]
To: mathgroup at smc.vnet.net
> Sent:	Wednesday, September 16, 1998, 20:11:59
> To:	mathgroup at smc.vnet.net
> Subject:	[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
> 
> 
> 
> ----- End Of Original Message -----




  • Prev by Date: Re: how to replace a list of variables
  • Next by Date: Re: Black-Scholes and exotic options
  • Previous by thread: Re: how to replace a list of variables
  • Next by thread: Re: how to replace a list of variables