Empty sym: 0-by-1

11 次查看(过去 30 天)
ali kaptanoglu
ali kaptanoglu 2020-9-7
clc;
clear;
syms x y z
a=-53.774+70+((30*(2*(37.839-x)-y))/((2*z-x)-y));
b=-54.827+70+((30*(2*(38.886-x)-y))/((2*z-x)-y));
c=-55.879+70+((30*(2*(39.932-x)-y))/((2*z-x)-y));
denklem=solve(a,b,c);
denklem.x

回答(1 个)

Walter Roberson
Walter Roberson 2020-9-9
Your equations are inconsistent. There is no solution.
>> subs(c,solve([a,b],[x,y]))
ans =
-1/174500 == 0
Your third equation is not consistent with the first two.
  1 个评论
Walter Roberson
Walter Roberson 2020-9-9
The problem is in floating point round off.
syms x y z
T = sym(19501769)/sym(349000)
a=-53.774+70+((30*(2*(37.839-x)-y))/((2*z-x)-y));
b=-54.827+70+((30*(2*(38.886-x)-y))/((2*z-x)-y));
c=-T+70+((30*(2*(39.932-x)-y))/((2*z-x)-y));
subs(c,solve([a,b],[x,y]))
The result will be 0.
If you solve([a,b,c]) then you will get a numeric x and y, and z would be 0. This is not the full story. What the above tells you is that with that set of equations, you only have two independent variables, and the third equation will be satisfied if you know the values for any two of the variables.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by