vpasolve not returning an answer, just Empty sym: 0-by-1
30 次查看(过去 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)
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!