f1 = @(t,x) -10.*x;
f2 = @(t,x) -4.*x+sin(t);
f3 = @(t,x) -x.^2;
f4 = @(t,x) -abs(x.^3);
f5 = @(t,x) -x-exp(x);
dt = 1.3;
t = 0:dt:100;
x = zeros(size(t));
x(1) = 1;
for i = 1:length(t)-1
x(i+1) = x(i)+dt*f5(t(i),x(i));
end
plot(t,x)
f1 = @(t,x) -10.*x;
f2 = @(t,x) -4.*x+sin(t);
f3 = @(t,x) -x.^2;
f4 = @(t,x) -abs(x.^3);
f5 = @(t,x) -x-exp(x);
dt = 1.3;
t = 0:dt:100;
x = zeros(size(t));
x(1) = 1;
for i = 1:length(t)-1
x(i+1) = x(i)+dt*f5(t(i),x(i));
end
plot(t,x)