Re: Utilizing the Result From Solve[]
- To: mathgroup at smc.vnet.net
- Subject: [mg64113] Re: [mg64099] Utilizing the Result From Solve[]
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Thu, 2 Feb 2006 00:04:58 -0500 (EST)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
Clear[z]; z=z/.Solve[z+2==3,z][[1]] 1 Bob Hanlon > > From: Shyam Guthikonda <shyamguth at gmail.com> To: mathgroup at smc.vnet.net > Subject: [mg64113] [mg64099] Utilizing the Result From Solve[] > > If I am solving a simple equation, such as: Solve[z+2 = = 3,z], this > returns {{z->1}}. How can I easily get the result, 1? Solve[] returns > the solution in rule form. > > The current method I use to just get the result looks very ugly. Is > there an easier way to do this? > > Here is my current method: > > ReplaceAll[z, First[ First[ Solve[ z + 2 = = 3, z ]]]]; > z = %; > > Now I can use z as a normal variable. > > Thanks! > _Shyam > >