vpasolve not returning an answer, just Empty sym: 0-by-1
27 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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)
0 Kommentare
Akzeptierte Antwort
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.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Formula Manipulation and Simplification finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!