Bill Allombert on Sun, 11 Dec 2005 19:00:14 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: again on matsolve() |
On Sun, Dec 11, 2005 at 06:06:19PM +0100, Alessio Rocchi wrote: > Hi everybody. > I'm stille experiencing problems while using matsolve(). > > I run the following command: > matsolve([1,1,0,0,0;2,2,0,0,0;3,3,0,0,0;1,0,0,2,0;2,0,2,0,0;0,1,1,0,1;4,0,0,0,1;2,0,1,1,0;1,0,0,0,0;2,1,0,0,0;3,2,0,0,0;2,0,0,2,0],[6,36,216,98,100,165,176,140,2,12,72,196]~) > First matrix is [12x5] and the second [12x1]. > All I can get is always -->*** matsolve: inconsistent data in gauss.<-- > May anybody explain me the reason for this to happen? Yes, a [12x5] matrix cannot be invertible: ? ??matsolve matsolve(x,y): x being an invertible matrix and y a column vector, finds the solution u of x*u = y, using Gaussian elimination. This has the same effect as, but is a bit faster, than x^{-1}*y. You probably want to use matinverseimage() instead: ? ??matinverseimage matinverseimage(M,y): gives a column vector belonging to the inverse image z of the column vector or matrix y by the matrix M if one exists (i.e such that Mz = y), the empty vector otherwise. To get the complete inverse image, it suffices to add to the result any element of the kernel of x obtained for example by matker. Cheers, Bill.