how to write for loop for this case?
    7 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
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 write code for this?(code for deltaT & Tn)
0 commentaires
Réponses (1)
  Manash Sahoo
      
 le 10 Fév 2021
        Could you elaborate on your question? Are you trying to execute this code in the context of a for loop? Additionally, I don't see a variable named "Tn".
But, if your question is how to turn this code into a for loop with 'deltaT' as the iterating variable, try this:
for deltaT = 0:50:150
    if deltaT == 0
        deltaT = 1;
    end
    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;
    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;
    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;
end
0 commentaires
Voir également
Catégories
				En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

