vpasolve not returning an answer, just Empty sym: 0-by-1

34 次查看(过去 30 天)
syms x
%Define Initial Conditions/Parameters
P = 1;
c_p = 1;
T_m = 1;
T_o = 0;
L = 1;
r_2 = 1;
r_1 = 1;
k = 2;
h_1 = 3;
%Numerically solve for the mass throughput
vpasolve(P-x*c_p*(T_m-T_o)*(exp(-1*L*(2*pi*r_2*1./(x*c_p))*(1./h_1+(r_2-r_1)./k).^-1)-1) == 0)

采纳的回答

Karan Gill
Karan Gill 2016-10-20
Your equation is never satisfied. Hence, "vpasolve" returns empty sym. Here's how to figure that out.
First, declare your equation separately because it's 1) good practice and 2) you can see your equation.
>> eqn = P-x*c_p*(T_m-T_o)*(exp(-1*L*(2*pi*r_2*1./(x*c_p))*(1./h_1+(r_2-r_1)./k).^-1)-1) == 0
eqn =
1 - x*(exp(-(6*pi)/x) - 1) == 0
Try to simplify
>> eqn = simplify(eqn)
eqn =
x*(exp(-(6*pi)/x) - 1) == 1
Now just plot the "lhs" to see if it ever equals "1".
lhs = children(eqn);
lhs = lhs(1);
fplot(lhs)
From the plot ( http://pasteboard.co/hh9ftvyZi.jpg ) you can see your equation is never satisfied. Hence, "vpasolve" returns empty sym.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Formula Manipulation and Simplification 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by