This is my code is this correct?
y0 = -1; % Initial Condition
h = 0.1;
t = 0:h:100;
N=length(t)
y_euler = zeros(size(t));
% Initial condition gives solution at t=0.
y_euler(1) = y0;
% Solving the equation via Euler's method
for i=1:(length(t)-1)
k1 = sqrt(t(i)*(y_euler(i)^2))-sqrt(t(i));
y_euler(i+1) = y_euler(i) + h*k1;
end
N50=(N-1)/2
Best Answer