|
"Gary B" wrote in message <iohie8$rod$1@ginger.mathworks.com>...
> ........
> I have a linear system A*x = b, where A has more columns than it has rows, size(A) = [3,4]. I can find a solution to this underdetermined system using either backslash or linprog (I used linprog as I wanted to constrain the solutions to be between a certain range), however I now need to find all the solutions.
> .........
- - - - - - - - -
Forget for a moment that you are seeking solutions with "12 bit resolution" but are dealing with numbers of infinite precision in the real domain. Suppose you have found some vector solution x0 to A*x0 = b. Now carry out a singular value decomposition on A.
[U,S,V] = svd(A);
so that A = U*S*V' (all with hypothetically infinite precision.) The last column of the 3 x 4 diagonal matrix S must be all zero and therefore the last column eigenvector of the 4 x 4 matrix V, call it x1, or any scalar multiple t thereof, will be a solution to A*x = 0. Hence you now have a general solution to A*x = b which is x = x0+t*x1 for any scalar t. In other words it is a certain "line" in four dimensional space parallel to the x1 vector running through the point x0.
There are clearly infinitely many possible points along this line which satisfy your three equations. Most probably none of these will be either all integers or even have a precisely 12 bit resolution. I claim therefore that you should be seeking vectors for x in which its four elements do satisfy your requirement (i.e., integers or 12-bit fractions and within some allowed ranges) and which (orthogonally?) depart from the above line by no more than some specified tolerance which you decide upon. The greater the tolerance you select, the larger the number of possible solutions. Note that the special solution x0 itself may not need to satisfy your requirements, but only points somewhere along the given line through x0.
If you were in two dimensions instead of four, picture yourself drawing a line on graph paper in which there was a grid of "acceptable" points, and you wish to determine all of these points which are sufficiently close to the line. That is the problem you face.
I haven't solved your problem but hopefully this may help to shed a little light on its true nature (at least as I envision it.)
Roger Stafford
|