empty sym: 0-by-1 for Simultaneous equation
2 次查看(过去 30 天)
显示 更早的评论
I'm trying to solve for these values but it keeps resulting in empty sym: 0-by-1. Any suggestions?
>> syms a b c d e x
>> equ1 = a + b == (0.83/12);
>> equ2 = c == (0.036/2);
>> equ3 = (0.048/16) + 2*0.21*x == 2*a + b + c + 2*d;
>> equ4 = 0.79*x == e;
>> equ5 = (a/(a + b + d + e)) == 0.109;
>> equ6 = (b/(b + a + d + e)) == 0.010;
>> equ7 = (d/(d + a + b + e)) == 0.071;
>> equ8 = (e/(e + a + b + d)) == 0.810;
>> sol = solve([equ1,equ2,equ3,equ4,equ5,equ6,equ7, equ8],[a,b,c,d,e,x]);
0 个评论
回答(2 个)
Walter Roberson
2021-1-18
You are trying to solve 8 equations for 6 variables, but they are not consistent for all 8 equations.
syms a b c d e x
equ1 = a + b == (0.83/12);
equ2 = c == (0.036/2);
equ3 = (0.048/16) + 2*0.21*x == 2*a + b + c + 2*d;
equ4 = 0.79*x == e;
equ5 = (a/(a + b + d + e)) == 0.109;
equ6 = (b/(b + a + d + e)) == 0.010;
equ7 = (d/(d + a + b + e)) == 0.071;
equ8 = (e/(e + a + b + d)) == 0.810;
sol = solve([equ1,equ2,equ3,equ4,equ5,equ6],[a,b,c,d,e,x]);
subs(equ7, sol), vpa(ans)
subs(equ8, sol), vpa(ans)
0 个评论
Shashank Gupta
2021-1-18
Hi Jacob,
If the solve function returns empty object then there is no solution exist for the given set of equations. I suggest you to check the feasibility of solution and equation first and then reform the equation and try.
Cheers.
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!