empty sym: 0-by-1 for Simultaneous equation

5 Ansichten (letzte 30 Tage)
Jacob Short
Jacob Short am 14 Jan. 2021
Beantwortet: Walter Roberson am 18 Jan. 2021
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]);

Antworten (2)

Walter Roberson
Walter Roberson am 18 Jan. 2021
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)
ans = 
ans = 
subs(equ8, sol), vpa(ans)
ans = 
ans = 

Shashank Gupta
Shashank Gupta am 18 Jan. 2021
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.

Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by