vpasolve not returning an answer, just Empty sym: 0-by-1
30 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
Karan Gill
on 20 Oct 2016
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 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!