From: David on 9 Aug 2010 16:19 Hello, I have two measurement matrices - A and b - with which I can set up the matrix equation Ax = b. I have been solving for the x matrix in MATLAB by using the following: x = pinv(A)*b, and so far this has given me pretty good results. However, thus far I have not taken the measurement uncertainties in A and b into account. I admit that linear algebra is not my strong point, and would like to ask the Newsgroup for suggestions on solving the following using MATLAB: (A + δA)(x + δx) = (b + δb), for x and δx, where δA. δx, and δb are the uncertainty matrices of A, x, and b, respectively. Any help would be greatly appreciated, and thanks ahead of time! Dave
From: Bruno Luong on 9 Aug 2010 17:38 "David " <dmklein(a)mdanderson.org> wrote in message <i3pns8$fgr$1(a)fred.mathworks.com>... > Hello, > > I have two measurement matrices - A and b - with which I can set up the matrix equation Ax = b. I have been solving for the x matrix in MATLAB by using the following: > > x = pinv(A)*b, > > and so far this has given me pretty good results. However, thus far I have not taken the measurement uncertainties in A and b into account. I admit that linear algebra is not my strong point, and would like to ask the Newsgroup for suggestions on solving the following using MATLAB: > > (A + δA)(x + δx) = (b + δb), > > for x and δx, where δA. δx, and δb are the uncertainty matrices of A, x, and b, respectively. In what form do you have the "uncertainty matrix"? If the error is Gaussian, for system of m x n, the error δb is characterized by the m x m covariance matrix and δA is (m*n) x (m*n) matrix. Those kinds of problems (actually with "strong" assumption on the uncertainty) can be solved by the "weighted-total-least-squares" and it is quite cumbersome to treat it academically. In practice they are not so important because most of the time the regularization is always needed, and that destroys the academic framework. Anyway, if you want to play around, take a look at papers by C. Paige, B.D. Rao, Golub/van Loan ... on Total Least Squares. Bruno
From: David on 9 Aug 2010 19:56 "Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <i3psft$8um$1(a)fred.mathworks.com>... > "David " <dmklein(a)mdanderson.org> wrote in message <i3pns8$fgr$1(a)fred.mathworks.com>... > > Hello, > > > > I have two measurement matrices - A and b - with which I can set up the matrix equation Ax = b. I have been solving for the x matrix in MATLAB by using the following: > > > > x = pinv(A)*b, > > > > and so far this has given me pretty good results. However, thus far I have not taken the measurement uncertainties in A and b into account. I admit that linear algebra is not my strong point, and would like to ask the Newsgroup for suggestions on solving the following using MATLAB: > > > > (A + δA)(x + δx) = (b + δb), > > > > for x and δx, where δA. δx, and δb are the uncertainty matrices of A, x, and b, respectively. > > In what form do you have the "uncertainty matrix"? If the error is Gaussian, for system of m x n, the error δb is characterized by the m x m covariance matrix and δA is (m*n) x (m*n) matrix. Those kinds of problems (actually with "strong" assumption on the uncertainty) can be solved by the "weighted-total-least-squares" and it is quite cumbersome to treat it academically. In practice they are not so important because most of the time the regularization is always needed, and that destroys the academic framework. Anyway, if you want to play around, take a look at papers by C. Paige, B.D. Rao, Golub/van Loan ... on Total Least Squares. > > Bruno Hi Bruno, Thanks for your fast response. To give a little more detail, both A and b are m × 2 matrices, and the x matrix is 2 × 1. I usually use m = 2, but would like to investigate the effects of using A and b having m > 2. The error in the b matrix is indeed Gaussian. The distribution of the uncertainty in A is technically unknown, but practically I think it can be assumed to be Gaussian without causing any problems. I'd ultimately like to get an uncertainty term for each value of the x matrix. Anyway, I'll look for those authors' works and post again if I come up with something useful. Thanks again! Dave
From: Greg Heath on 9 Aug 2010 22:15 On Aug 9, 4:19 pm, "David " <dmkl...(a)mdanderson.org> wrote: > Hello, > > I have two measurement matrices - A and b - with which I can set up the matrix equation Ax = b. I have been solving for the x matrix in MATLAB by using the following: > > x = pinv(A)*b, > > and so far this has given me pretty good results. However, thus far I have not taken the measurement uncertainties in A and b into account. I admit that linear algebra is not my strong point, and would like to ask the Newsgroup for suggestions on solving the following using MATLAB: > > (A + δA)(x + δx) = (b + δb), > > for x and δx, where δA. δx, and δb are the uncertainty matrices of A, x, and b, respectively. > > Any help would be greatly appreciated, and thanks ahead of time! > Dave Please change your font so that sequences of weird parameters are not posted on the newgroup. About 50 years ago I had a homework problem that required the following proof for invertible A: ||dx||/||x|| <= cond(A)*(||dA||/||A|| + ||db||/||b||) This can be derived by linearizing and combining the equations 1. A*x = b 2.||b|| <= ||A||*||x|| 3. dx = inv(A)*( db -dA*x) Hope this helps. Greg
From: Bruno Luong on 10 Aug 2010 03:56
> > Hi Bruno, Thanks for your fast response. > > To give a little more detail, both A and b are m × 2 matrices, and the x matrix is 2 × 1. The dimensions do not match, - if A is m x 2, and b is m x 2, then x must be 2 x 2. - if A is m x 2, and x is 2 x 1, then b must be m x 1. >I usually use m = 2, but would like to investigate the effects of using A and b having m > 2. The error in the b matrix is indeed Gaussian. The distribution of the uncertainty in A is technically unknown, but practically I think it can be assumed to be Gaussian without causing any problems. I'd ultimately like to get an uncertainty term for each value of the x matrix. You still don't fully answer my question, which is: how do you input the uncertainty of A and b? The Gaussian is characterized by the covariance *matrix*, which is a matrix of the dimension of the vectors. Do you know them? The simplest case is the covariance matrix is the fixed variance times identity, in this case use total least-squares like this (assuming b is a column vector): % Data A = rand(3) b = rand(3,1) % standard deviation of A, the scalar here is simple case, % this can get more complicated: a 9 x 9 sdp matrix (6DOFs) needed to be entered sigmaA= 0.1 % standard deviation of b, similar remark to above sigmab = 1 % engine M = [1/sigmaA*A 1/sigmab*b] [U S V] = svd(M,0); n = size(A,2) x = -V(1:n,end)/V(end) % Bruno |