how to plotting all results when i using for loop
Afficher commentaires plus anciens
for T_cond = [-100:20:0]
for T_cond = 273.15+T_cond
.
.
.
etc..
m_wf = m_LNG*(h_5s-h_5)/(h_4s-h_4);
m_wf = m_wf + 0;
E_th = (h_2-h_3-h_1+h_4)/(h_2-h_1);
E_th = (E_th + 0)*100;
disp(['E=',num2str(E_th),'%'])
disp(['m=',num2str(m_wf),'kg/s'])
end
end
plot(T_cond,m_wf)
plot(T_cond,E_th)
I want to plot all results in for loop.. but I'm beginner..so It's so hard to me.. Actually This is the first time in my life..help me please
1 commentaire
KSSV
le 1 Nov 2018
YOu need to reconsider your code..you should not use same index T_cond for the loops.
Réponse acceptée
Plus de réponses (1)
madhan ravi
le 1 Nov 2018
plot(T_cond,m_wf)
hold on
plot(T_cond,E_th)
Should be inside loop
Catégories
En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!