Anda di halaman 1dari 1

%PLACA CALENTADA METODO RUNGE-KUTTA

clear, clc
format short
dt=60;
Tf=600;
T(1)=800;
a=-2.2067E-12;
for i=1:Tf
K1(i)=dt*a*(((T(i))^4)-81E8);
K2(i)=dt*a*(((0.5*K1(i)+T(i))^4)-81E8);
K3(i)=dt*a*(((0.5*K2(i)+T(i))^4)-81E8);
K4(i)=dt*a*(((K3(i)+T(i))^4)-81E8);
T(i+1)=T(i)+(1/6)*(K1(i)+2*K2(i)+2*K3(i)+K4(
i));
y(i)=T(i);
end
w=1:Tf;
plot(w,y)
grid
xlabel('TIEMPO TRANSCURRIDO (seg)')
ylabel('TEMPERATURAS(K)')
title('CURVA DE TEMPERATURAS RUNGE-KUTTA')
h = legend('temperaturas calculadas',1);