empty sym: 0-by-1 for Simultaneous equation
Show older comments
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]);
Answers (2)
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)
Shashank Gupta
on 18 Jan 2021
0 votes
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.
Categories
Find more on Mathematics in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!