%% Euler's Method

%% Inputs
T=1;
n=100;
x0=1/2;


%% Inputs for logistic equation
r=2;
kappa=3;

%% Construction of domain
t=linspace(0,T,n);
dt=t(2)-t(1);

%% Construction of range
x=x0*ones(1,n);

%% Applying Euler's Method

for i=1:n-1
x(i+1)=x(i)+LogisticRHS(x(i),r,kappa);
end

%% Plotting Solution
figure('units', 'normalized', 'outerposition', [0,0,1,1]);
plot(t,x,'linewidth',2);
xlabel('$$t$$','interpreter','latex','fontsize',36)
ylabel('$$x$$','interpreter','latex','fontsize',36)
ax = gca;
ax.FontSize = 36;