フィルターのクリア

I have this problem Exiting fzero: aborting search for an interval containing a sign change because no sign change is detected during search. Function may not have a root.

6 ビュー (過去 30 日間)
V3=fzero(@Pr3,0.7);
V3
function y=Pr3(V)
Pr=4;
R=0.08206;
T=450;
Tc=405.5;
Pc=111.3;
P=Pr*Pc;
a=0.42747*((R^2)*Tc^(5/2)/Pc);
b=0.08664*(R*Tc/Pc);
y=((R*T)/(V-b))-(a/(V*(V+b)*T^(1/2)))-P;
end

回答 (1 件)

Walter Roberson
Walter Roberson 2024 年 2 月 26 日
syms V
Q = @(v) sym(v);
Pr = Q(4);
R = Q(08206) / Q(10)^5;
T = Q(450);
Tc = Q(405.5);
Pc = Q(1113) / Q(10)^1;
P = Pr*Pc;
a = Q(42747) / Q(10)^5 * ((R^2)*Tc^(5/2)/Pc);
b = Q(08664) / Q(10)^5 * (R*Tc/Pc);
y = ((R*T)/(V-b))-(a/(V*(V+b)*T^(1/2)))-P;
y
y = 
sol = solve(y, 'maxdegree', 3)
sol = 
vpa(sol)
ans = 
  1 件のコメント
Walter Roberson
Walter Roberson 2024 年 2 月 26 日
format long g
V3=fzero(@Pr3,0.05);
V3
V3 =
0.050876353674731
function y=Pr3(V)
Pr=4;
R=0.08206;
T=450;
Tc=405.5;
Pc=111.3;
P=Pr*Pc;
a=0.42747*((R^2)*Tc^(5/2)/Pc);
b=0.08664*(R*Tc/Pc);
y=((R*T)/(V-b))-(a/(V*(V+b)*T^(1/2)))-P;
end

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeFunction Creation についてさらに検索

タグ

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by