Re: solution to undetermined linear equation
- To: mathgroup at smc.vnet.net
- Subject: [mg83976] Re: solution to undetermined linear equation
- From: dh <dh at metrohm.ch>
- Date: Thu, 6 Dec 2007 02:37:59 -0500 (EST)
- References: <fj64qu$fbo$1@smc.vnet.net>
Hi Shame, your condition g1+g2+g3+..g13=13 is simply an additional equation.Therefore, you have 4 instead of 3 equations. Your 3x13 matrix M becomes a 4 x 13 matrix with and additional row of {1,1,1...} and your equations read: M.g == rhs, where g is the searched solution and rhs the vector {0,0,..,0,13}. You have now 4 equations and 13 variables. Therefore, there maybe many solutions. You can now either use LinearSolve, this returns one of the many possible solution. The rest you may get from the NullSpace. Or you can use Solve that gives you 4 g's as a function of the remaining g's hope this helps, Daniel shama shahbaz wrote: > hi > > my basic problem is i have a matrix 13*3 of values > > -0.2028 0.12778 -0.09129 > 0.1278 -0.09129 0.07089 > -0.09129 0.07089 -0.05731 > 0.07089 -0.05731 0.04902 > -0.05731 0.04902 -0.04188 > 0.04902 0.04188 0.03747 > > ............. > ............ > > > i want to find wieght factors which when applied to above values would result in a value close to 0 > > such as > > -0.2028 g1 + 0.1278 g2 + -0.09129 g3 +0.07089 g4+........................g13=min > 0.12778 g1+-0.09129g2 + 0.07089 g3 + -0.05731g4+.........................g13=min > -0.09129g1+0.07089g2+ -0.05731g3 + 0.04902 g4+........................g13=min > > > howeverthe values of g's should be subjected to the constraint > > g1+g2+g3+.........................g13=13 and all the wieghts must be nonzero > > Is it possible > > thankyou for your patience > regards, > >