필터 지우기
필터 지우기

what is loop for this relation?

조회 수: 2 (최근 30일)
bahareh bshrt
bahareh bshrt 2021년 2월 10일
편집: Paresh yeole 2021년 2월 11일
I have this relation
deltaT=50;
K_eff=C_E+(teta*deltaT*K_E);
F_eff=(C_E-((1-teta)*deltaT*K_E))*T0+(deltaT*F_e);
T50=K_eff\F_eff;
deltaT=100;
K_eff=C_E+(teta*deltaT*K_E);
F_eff=(C_E-((1-teta)*deltaT*K_E))*T50+(deltaT*F_e);
T100=K_eff\F_eff;
deltaT=150;
K_eff=C_E+(teta*deltaT*K_E);
F_eff=(C_E-((1-teta)*deltaT*K_E))*T100+(deltaT*F_e);
T150=K_eff\F_eff;
can anyone help me to wirte code ( i want to write code for deltaT & Tn) ?

답변 (1개)

Paresh yeole
Paresh yeole 2021년 2월 10일
편집: Paresh yeole 2021년 2월 11일
i = 2;
j = 1;
T(j) = T0;
for deltaT=50:50:150
K_eff=C_E+(teta*deltaT*K_E);
F_eff=(C_E-((1-teta)*deltaT*K_E))*T(j)+(deltaT*F_e);
T(i)=K_eff\F_eff;
i = i+1;
j = j+1;
end
  댓글 수: 2
Walter Roberson
Walter Roberson 2021년 2월 10일
편집: Walter Roberson 2021년 2월 10일
not quite, the T* variables need to change. T0 must be input then each round uses the T calculated in previous round
Paresh yeole
Paresh yeole 2021년 2월 11일
편집: Paresh yeole 2021년 2월 11일
Hey walter!
The author edited the question later on. I have edited the answer.
Thanks for pointing it out.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by