In python it is possible to solve {A}[x]=[B] where A is a known matrix, B a known vector and x an unknown vector.
But is it possible to solve {A}[x]=[B] if A is a know 3x3 matrix, x = [V1 5 V3] and B = [0 I2 0] ?
Thank you very much for your help.
In python it is possible to solve {A}[x]=[B] where A is a known matrix, B a known vector and x an unknown vector.
But is it possible to solve {A}[x]=[B] if A is a know 3x3 matrix, x = [V1 5 V3] and B = [0 I2 0] ?
Thank you very much for your help.
It's certainly feasible to reduce columns and rows and go down this route but I would rather suggest an alternative approach here. Reformulate your problem as a quadratic problem in 3n unknowns. Use cvxopt to solve it. Essentially you are trying to minimize the 2-norm of the residual r = Ax-b where x and b are vector in n variables. So define
0 = row_i of A * x - b_i - r_i
introduce constraints on
x and b
e.g. b_1 = 0 x_2 = 0.3*x1 etc.
and minimize
sum r_i^2
You could also do something like sum abs(r_i) and introduce another set of n variables and solve a linear problem in 4n dimensions
I tried applying the same method to a more complex system :
A is known 19x19 matrix x = [V1, V2, 5, V4, V5, V6, 0.97*V8, V8, V9, V10, V12*0.97, V12, 0, V14, V15, V16, V17, V18, V19] B = [0, 0, I3, 0, 0, 0, I7, 0, 0, 0, I11, 0, I13, 0, 0, 0, 0, 0, 0] I can see how to apply the method for the third and thirteenth line but what about the seventh and eleventh ? Does the method still work ? – Anthony Lethuillier Nov 11 '14 at 16:14