Hasan Volkan Guducu wrote: >hello , for my project i should somehow solve 4 equations with 4 >unknowns (something like > r^2 -x^2 = (r+A1)^2 - (200-x)^2 eqn.1 >r^2 -y^2 = (r+A2)^2 - (200-y)^2 eqn.2 >r^2 -z^2 = (r+A3)^2 - (100-z)^2 eqn.3 >y^2 + z^2 = r^2 - x^2 eqn.4 > > i have the values for A1 A2 A3 and asked to find the r,x,y and z >values.) > >i am using 16f84, is 64 bytes ram area is enough and if it is so how >to do? > i consider using MATLAB but i dont know how to implement MATLAB >toolbox to the pic? >thanks, Someone else already replied that the pic may not be the right tool for the job, which is certainly good advice as far as it goes. If however you need to solve these equations in real time as part of a pic-based application, then you may be able to do something. As a rule, the more manipulation and simplification you can do by hand, the better off you will be when it comes time to write code. In your case, your equations can be simplified to a single quadratic equation for r, which in general will have two solutions. Are your coefficients (A1 etc.) integers? If so, you may be able to do some further simplifications. If not, you'll need to use some kind of fixed or floating point (or LNS?) representation, and write an optimized routine for the square root. If you know something about the relative sizes of the expected values of the coefficients, you may be able to use Newton's method or similar tricks to further simplify. My main point is this: do as much as you can by hand, to take as much of the computational burden off the pic as you possibly can. If you know anything about the coefficients beforehand, use that information to further simplify. If you take this approach, you may well be able to do it on a pic. Michael V Thank you for reading my little posting. _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads