Hello Abdurauf,
It worked well, I just made a small change, in the print statement:
كود:
r=0.2; T=86 ; t=0 ; Ts=17; h=0.1 ; nsteps=3000 ;
for i=0:nsteps
dT=-r*h*(T(i+1)-Ts) ;
T(i+2)=T(i+1)+dT ;
t(i+2)=t(i+1)+h;
fprintf('%0.2f %0.3f\n',t(i+1),T(i+1))
end
plot(t,T)
Now, how the program will differs, when I add the cream at the beginning or at the end of the 5 min?!
Beginning, I should subtract 5 from the first cell, and update the rest of the cells.
End, subtract 5 from the last cell only.
Thanks so much for your help