Solving a system of equations
1 次查看(过去 30 天)
显示 更早的评论
Hello everyone.
I have a system of equations in matrix form like this: (This is just an example. In fact the size of matrix A is 13*1 and B is 13*53 and C is 53*13]).
A=B*C
A=[x1,y1,z1,0,0,0,1]'
B=[a1,a2,a3,0,0,0,a4;a5,a6,a7,0,0,0,0;a8,a9,a10,0,0,0,0;0,0,0,a11,a12,0,a13;0,0,0,a14,a15,0,a16;0,0,0,a17,a18,a19,a20;0,0,0,0,0,0,1];
C=[3,4,5,x2,y2,z2,1]'
In this equation x1,x2,y1,y2,z1,z2 are the unknowns and ai (i=1 to 20) are the known values.
Do you know how can I solve this system?
2 个评论
回答(1 个)
Paul
2022-8-10
Hi Mitra
Maybe this will extend to the larger problem.
syms x1 y1 z1 x2 y2 z2
syms a [1 20]
A=[x1,y1,z1,0,0,0,1].';
B=[a1,a2,a3,0,0,0,a4;a5,a6,a7,0,0,0,0;a8,a9,a10,0,0,0,0;0,0,0,a11,a12,0,a13;0,0,0,a14,a15,0,a16;0,0,0,a17,a18,a19,a20;0,0,0,0,0,0,1];
C=[3,4,5,x2,y2,z2,1].';
sol = solve(A==B*C,[x1 y1 z1 x2 y2 z2])
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Power and Energy Systems 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!