# Empty 0-by-1 when using solve:

4 ビュー (過去 30 日間)
Rodrigo Barreto 2019 年 12 月 7 日
Answered: Walter Roberson 2019 年 12 月 8 日
syms x1 x2 x3 x4 x5 x6 x7 x8 x9
eqt1=x1+1600*x2+1600^2*x3+(x4+1600*x5+1600^2*x6)*50+(x7+1600*x8*1600^2*x9)*50^2==260;
eqt2=x1+1600*x2+1600^2*x3+(x4+1600*x5+1600^2*x6)*100+(x7+1600*x8*1600^2*x9)*100^2==55;
eqt3=x1+1600*x2+1600^2*x3+(x4+1600*x5+1600^2*x6)*200+(x7+1600*x8*1600^2*x9)*200^2==30;
eqt4=x1+1300*x2+1300^2*x3+(x4+1300*x5+1300^2*x6)*50+(x7+1300*x8*1300^2*x9)*50^2==40;
eqt5=x1+1300*x2+1300^2*x3+(x4+1300*x5+1300^2*x6)*100+(x7+1300*x8*1300^2*x9)*100^2==36;
eqt6=x1+1300*x2+1300^2*x3+(x4+1300*x5+1300^2*x6)*200+(x7+1300*x8*1300^2*x9)*200^2==15;
eqt7=x1+1100*x2+1100^2*x3+(x4+1100*x5+1100^2*x6)*50+(x7+1100*x8*1100^2*x9)*50^2==21;
eqt8=x1+1100*x2+1100^2*x3+(x4+1100*x5+1100^2*x6)*100+(x7+1100*x8*1100^2*x9)*100^2==17;
eqt9=x1+1100*x2+1100^2*x3+(x4+1100*x5+1100^2*x6)*200+(x7+1100*x8*1100^2*x9)*200^2==3;
sol=solve([eqt1,eqt2,eqt3,eqt4,eqt5,eqt6,eqt7,eqt8,eqt9],[x1,x2,x3,x4,x5,x6,x7,x8,x9])
a1=sol.x1

#### 1 件のコメント

Star Strider 2019 年 12 月 7 日
There does not appear to be a unique solution:
syms x1 x2 x3 x4 x5 x6 x7 x8 x9
eqt1=x1+1600*x2+1600^2*x3+(x4+1600*x5+1600^2*x6)*50+(x7+1600*x8*1600^2*x9)*50^2-260;
eqt2=x1+1600*x2+1600^2*x3+(x4+1600*x5+1600^2*x6)*100+(x7+1600*x8*1600^2*x9)*100^2-55;
eqt3=x1+1600*x2+1600^2*x3+(x4+1600*x5+1600^2*x6)*200+(x7+1600*x8*1600^2*x9)*200^2-30;
eqt4=x1+1300*x2+1300^2*x3+(x4+1300*x5+1300^2*x6)*50+(x7+1300*x8*1300^2*x9)*50^2-40;
eqt5=x1+1300*x2+1300^2*x3+(x4+1300*x5+1300^2*x6)*100+(x7+1300*x8*1300^2*x9)*100^2-36;
eqt6=x1+1300*x2+1300^2*x3+(x4+1300*x5+1300^2*x6)*200+(x7+1300*x8*1300^2*x9)*200^2-15;
eqt7=x1+1100*x2+1100^2*x3+(x4+1100*x5+1100^2*x6)*50+(x7+1100*x8*1100^2*x9)*50^2-21;
eqt8=x1+1100*x2+1100^2*x3+(x4+1100*x5+1100^2*x6)*100+(x7+1100*x8*1100^2*x9)*100^2-17;
eqt9=x1+1100*x2+1100^2*x3+(x4+1100*x5+1100^2*x6)*200+(x7+1100*x8*1100^2*x9)*200^2-3;
eqt1 = simplify(eqt1, 'Steps', 250);
eqt2 = simplify(eqt2, 'Steps', 250);
eqt3 = simplify(eqt3, 'Steps', 250);
eqt4 = simplify(eqt4, 'Steps', 250);
eqt5 = simplify(eqt5, 'Steps', 250);
eqt6 = simplify(eqt6, 'Steps', 250);
eqt7 = simplify(eqt7, 'Steps', 250);
eqt8 = simplify(eqt8, 'Steps', 250);
eqt9 = simplify(eqt9, 'Steps', 250);
% sol=vpasolve([eqt1,eqt2,eqt3,eqt4,eqt5,eqt6,eqt7,eqt8,eqt9],[x1,x2,x3,x4,x5,x6,x7,x8,x9])
% a1=sol.x1
eqtfcn = matlabFunction([eqt1,eqt2,eqt3,eqt4,eqt5,eqt6,eqt7,eqt8,eqt9], 'Vars',{[x1,x2,x3,x4,x5,x6,x7,x8,x9]})
soln = fsolve(eqtfcn, ones(1,9))

サインイン to comment.

### 件の回答 (1)

Walter Roberson 2019 年 12 月 8 日
The equations are inconsistent. If you solve the first 7 equations for [x1, x2, x3, x4, x5, x7, x8], and substitute those in to the 8th and 9th equations, then you end up with
[366349/1899 + 5000000*x6 = 17, 649934/1899 + 15000000*x6 = 3]
which is inconsistent.

#### 0 件のコメント

サインイン to comment.

サインイン してこの質問に回答します。

Translated by