3
// RHS of Differential equation
10
yd(1) = l.*(e-r*y(2));
14
yd(1)=l*(e*en-y(2)*r);
15
yd(2)=(y(1)-y(2))/(r*c);
23
if t1>pe2 then en=0; else en=1; end;
25
function [en]=ene1(t,pe1,pe2)
27
en=round( ones(t1)-t1/pe1 + (.5-(1.-pe2/pe1))*ones(t1) )
29
function [en]=ene2(t,pe1,pe2)
31
en=round( ones(t1)-t1 + (.5-(1-pe2/pe1))*ones(t1) )
33
function [en]=ene3(t,pe1,pe2)
34
en=round( ones(t)-t/pe1+int(t/pe1) + (.5-(1-pe2/pe1))*ones(t) )