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

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

 Respuesta aceptada

tajid
tajid el 22 de Nov. de 2022

0 votos

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

Más respuestas (0)

Categorías

Más información sobre MATLAB 快速入门 en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 22 de Nov. de 2022

Respondida:

el 22 de Nov. de 2022

Community Treasure Hunt

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

Start Hunting!