what is loop for this relation?

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 日

0 投票

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.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

質問済み:

2021 年 2 月 10 日

編集済み:

2021 年 2 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by