J'ai fait un bout de code sous Matlab qui me permet de calculer les t et theta_a correspondants au travers d'une boucle.
J'essaie de faire conservé à Matlab les résultats de chacune des 3600 étapes que comporte ma boucle sous forme de graphique mais une fois la boucle terminée, il me ferme le graphe ...
Pourriez-vous m'indiquer comment mieux faire ?
- Code: Tout sélectionner
% Projet GC acier inoxydable, Marc-Antoine Fénart
% Initialisation des valeurs
Am = 1.56;
V = 0.024301;
massivete = Am/V
alpha_c = 25;
epsi_res = 0.4;
rho_a = 7800;
phi = 1;
t=0;
theta_g = 20+345*log10(8*t/60+1)
theta_a = 20;
hnetr = phi*epsi_res*5.67*10^(-8)*(((theta_g + 273)^(4))-((theta_a + 273)^(4)))
hnetc = alpha_c*(theta_g - theta_a)
hnetd = hnetr + hnetc
ca = 450+0.28*theta_a-2.91*10^(-4)*(theta_a)^(2)+1.34*10^(-7)*(theta_a)^(3)
delta_t = 1
delta_theta_a_t = (massivete/(ca*rho_a))*hnetd*delta_t
% Mise à jour des valeurs
for i = 1:3600;
i=i;
t=t+delta_t
theta_g = 20+345*log10(8*t/60+1)
theta_a = theta_a+delta_theta_a_t
hnetr = phi*epsi_res*5.67*10^(-8)*(((theta_g + 273)^(4))-((theta_a + 273)^(4)))
hnetc = alpha_c*(theta_g - theta_a)
hnetd = hnetr + hnetc
ca = 450+0.28*theta_a-2.91*10^(-4)*(theta_a)^(2)+1.34*10^(-7)*(theta_a)^(3)
delta_theta_a_t = (massivete/(ca*rho_a))*hnetd*delta_t
plot(t,theta_a)
end;
