(Matrix Optimization) Optimization method for coefficient matrix in Ax = b with known x and b.
2 views (last 30 days)
Show older comments
Nipun Vashistha
on 12 Jun 2022
Commented: Nipun Vashistha
on 12 Jun 2022
Hi,
I have two 4*1 data vectors x and b which represents meaured 'Intensity vector' and 'Stokes vector'. These two vectors are related to each other by a 4*4 transfer matrix A as Ax = b. In the ideal case, the relationship for all x and b must satisfy Ax = b for an ideal transfer matrix A_ideal = [0.5 0.5 0 0;0.5 0 0.5 0;0.5 -0.5 0 0;0.5 0 -0.5 0].
Now, in a non-ideal system I want to predict the matrix A for some x and b which will satisfy Ax = b. In the optimization routine A can be initialized as A_ideal and will optimize after each iteration until Ax = b is satified (or we get an near approximation).
What is the best method to optimization the above matrix and how can I implement it?
Thank you!
0 Comments
Accepted Answer
Torsten
on 12 Jun 2022
If x1, b1, x2, b2 are your given data, use
x1 = [2 7 56 -3];
b1 = [12 -4 0.23 pi];
x2 = [-5 23 9.5 12];
b2 = [0.43 2.4 -12.67 exp(2)];
n = 4;
M = [x1,zeros(1,n),zeros(1,n),zeros(1,n);...
zeros(1,n),x1,zeros(1,n),zeros(1,n);...
zeros(1,n),zeros(1,n),x1,zeros(1,n);...
zeros(1,n),zeros(1,n),zeros(1,n),x1;...
x2,zeros(1,n),zeros(1,n),zeros(1,n);...
zeros(1,n),x2,zeros(1,n),zeros(1,n);...
zeros(1,n),zeros(1,n),x2,zeros(1,n);...
zeros(1,n),zeros(1,n),zeros(1,n),x2];
R = [b1.';b2.'];
A = lsqlin(M,R);
norm(M*A-R)
A = reshape(A,n,n).'
A*x1.'-b1.'
A*x2.'-b2.'
More Answers (1)
Torsten
on 12 Jun 2022
If you have two 4x1 data vectors x and b to estimate A, you have 8 equations in 16 unknowns.
This system is underdetermined - you can imagine that in general, there are infinitely many ways how A can be chosen.
Is this ok for you ? Or are there some restrictions on the elments of A that should be incorporated ?
See Also
Categories
Find more on Systems of Nonlinear Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!