Prev: show to save a matlab generated image to specific location in
Next: Function definition inside a script
From: tyler on 23 May 2010 02:39 These are 2 Law of Cosines equation, i need your help to solve this: (r1+150)^2 = (r1+200)^2 + 499.1^2 -2*(r1+200) * 499.1 * cos(16.177 ) r1^2 = (r1+200)^2 + 1267.9^2 -2*(r1+200) * 1267.9* cos (teta - 16.177 ) Unknowns: r1, teta please help me solve this using matlab!!! Thanks Tyler
From: Walter Roberson on 23 May 2010 11:09
tyler wrote: > These are 2 Law of Cosines equation, i need your help to solve this: > > (r1+150)^2 = (r1+200)^2 + 499.1^2 -2*(r1+200) * 499.1 * cos(16.177 ) > > r1^2 = (r1+200)^2 + 1267.9^2 -2*(r1+200) * 1267.9* cos (teta - 16.177 ) > > > Unknowns: r1, teta > > please help me solve this using matlab!!! Expand the first equation in r1, and move everything to the same side. You will be left with a quadratic equation independent of theta, which you can solve directly using the usual formula. Substitute each of the two roots into the second equation and isolate down to cos(theta-16.177), take the arccos and add 16.177 to get the relevant theta. No Law of Cosines needed. Caution: be sure you know whether you are talking about 16 1/6 degrees or 16 1/6 radians. |