这个迭代错了吗?运行不了。

for tcl=(0:0.1:45)
if 2.38*(tcl-12.2)^0.25>=12.1*0.1^0.5
hc=2.38*(tcl-12.2)^0.25
else
hc=2.38*0.1^0.5
end
Tcl=(61.97-0.3485*10^(-8)*(tcl+273)^4+0.088*hc*12.2)/(1+0.88*hc)
while abs(Tcl-tcl)>=0.01
tcl=Tcl
if 2.38*(tcl-12.2)^0.25>=12.1*0.1^0.5
hc=2.38*(tcl-12.2)^0.25
else
hc=12.1*0.1^0.5
end
Tcl=(61.97-0.3485*10^(-8)*(tcl+273)^4+0.088*hc*12.2)/(1+0.88*hc)
end
Tcl

 Réponse acceptée

tajid
tajid le 22 Nov 2022

0 votes

for tcl=(0:0.1:45)
if 2.38*(tcl-12.2)^0.25>=12.1*0.1^0.5
hc=2.38*(tcl-12.2)^0.25
else
hc=2.38*0.1^0.5
end
end
Tcl=(61.97-0.3485*10^(-8)*(tcl+273)^4+0.088*hc*12.2)/(1+0.88*hc)
while abs(Tcl-tcl)>=0.01
tcl=Tcl
if 2.38*(tcl-12.2)^0.25>=12.1*0.1^0.5
hc=2.38*(tcl-12.2)^0.25
else
hc=12.1*0.1^0.5
end
Tcl=(61.97-0.3485*10^(-8)*(tcl+273)^4+0.088*hc*12.2)/(1+0.88*hc)
end
Tcl

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB 快速入门 dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!