what is loop for this relation?
조회 수: 2 (최근 30일)
이전 댓글 표시
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) ?
댓글 수: 0
답변 (1개)
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
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
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 Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!