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

27 Ansichten (letzte 30 Tage)
HelloWorld
HelloWorld am 19 Okt. 2016
Bearbeitet: Walter Roberson am 16 Jan. 2017
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)

Akzeptierte Antwort

Karan Gill
Karan Gill am 20 Okt. 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.

Weitere Antworten (0)

Kategorien

Mehr zu Formula Manipulation and Simplification finden Sie in Help Center und File Exchange

Tags

Noch keine Tags eingegeben.

Community Treasure Hunt

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

Start Hunting!

Translated by