Prev: Getting nice PlotMarkers, and some more ListPlot styling
Next: Putting a Plot inside a Graphics function with
From: Maria Davis on 7 Mar 2010 05:14 Hi; I have such equations: x=a+b y=c+d a=z+t b=y I want to use mathematica in order to simplify x and obtain: x=z+t+c +d I have used: [x,Listofequations] This function is available if I have equations written in the following order: x=a+b a=z+t b=y y=c+d but in the case of non ordered equations, it doesn't work. Further, I must use equations in the order given. Please can you help me. Thanks
From: Sjoerd C. de Vries on 8 Mar 2010 06:12 It's not particularly clear what your problem is but can't you use Set Dealyed (:=) ? x := a + b y := c + d a := z + t b := y x c + d + t + z Cheers -- Sjoerd On Mar 7, 12:14 pm, Maria Davis <arbi...(a)gmail.com> wrote: > Hi; > I have such equations: > x=a+b > y=c+d > a=z+t > b=y > > I want to use mathematica in order to simplify x and obtain: x=z+t+c > +d > I have used: [x,Listofequations] > This function is available if I have equations written in the > following order: > x=a+b > a=z+t > b=y > y=c+d > > but in the case of non ordered equations, it doesn't work. Further, I > must use equations in the order given. > Please can you help me. > Thanks
From: Bill Rowe on 8 Mar 2010 06:14 On 3/7/10 at 5:10 AM, arbiadr(a)gmail.com (Maria Davis) wrote: >I have such equations: >x=a+b >y=c+d >a=z+t >b=y In Mathematica, these are assignments, not equations. An equation is written using "==" not "=" in Mathematica. >I want to use mathematica in order to simplify x and obtain: >x=z+t+c +d I have used: [x,Listofequations] This function is >available if I have equations written in the following order: x=a+b >a=z+t b=y y=c+d It is hard to comment on the above since you omitted the function you tried. In any case, first create a list of equations In[1]:= eqns = {x == a + b, y == c + d, a == z + t, b == = y}; then the desired result can be obtained using Eliminate as follows: In[2]:= Eliminate[eqns, {a, b, y}] Out[2]= c+d+t+z==x
From: Bob Hanlon on 8 Mar 2010 06:18 eqns = {x == a + b, y == c + d, a == z + t, b == y}; x == (x //. Rule @@@ eqns) x == c + d + t + z This works for any ordering of the equations Union[x == (x //. Rule @@@ #) & /@ Permutations[eqns]] {x == c + d + t + z} Bob Hanlon ---- Maria Davis <arbiadr(a)gmail.com> wrote: ============= Hi; I have such equations: x=a+b y=c+d a=z+t b=y I want to use mathematica in order to simplify x and obtain: x=z+t+c +d I have used: [x,Listofequations] This function is available if I have equations written in the following order: x=a+b a=z+t b=y y=c+d but in the case of non ordered equations, it doesn't work. Further, I must use equations in the order given. Please can you help me. Thanks
From: dh on 9 Mar 2010 06:18 Hi, ReplaceRepeated (not ReplaceAll) can do the job: a + b //. {y -> c + d, a -> z + t, b -> y} Daniel On 07.03.2010 11:14, Maria Davis wrote: > Hi; > I have such equations: > x=a+b > y=c+d > a=z+t > b=y > > I want to use mathematica in order to simplify x and obtain: x=z+t+c > +d > I have used: [x,Listofequations] > This function is available if I have equations written in the > following order: > x=a+b > a=z+t > b=y > y=c+d > > but in the case of non ordered equations, it doesn't work. Further, I > must use equations in the order given. > Please can you help me. > Thanks > -- Daniel Huber Metrohm Ltd. Oberdorfstr. 68 CH-9100 Herisau Tel. +41 71 353 8585, Fax +41 71 353 8907 E-Mail:<mailto:dh(a)metrohm.com> Internet:<http://www.metrohm.com>
|
Next
|
Last
Pages: 1 2 Prev: Getting nice PlotMarkers, and some more ListPlot styling Next: Putting a Plot inside a Graphics function with |