Am 21. April 2020 um 17:13 Uhr schrieb "이태훈":
> Hi all
> I use this code for my work, Whenever I run this, I get this:
> warning: division by zero
> warning: called from
> EulerExplict at line 25 column 11
> Can you help me to solve this problem?
> t0 = 0 ;
> T = [t0:h:tEnd]';
> for i= 1:N
> fi = 20.*2.717.^((umax.*(I0.*2.717.^(((-3).*(Y(i)).*(z))./(I0.*2.717.^((-3).*(Y(i)).*(z))).+km))-D).*T(i));
> Y(i+1) = Y(i).+(h.*fi);
T(1) is t0 which is 0. So you are dividing by zero. Hence the warning.
If you want to suppress the warning, have a look at the documentation for "warning":
Query the id of the last warning with
[~, id] = lastwarn ()