필터 지우기
필터 지우기

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 CenterFile Exchange에서 Function Creation에 대해 자세히 알아보기

태그

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by