clear all;
close all;
Delta_t=1.0e-4;
%Delta_t=1.0e-5;
%Delta_t=1.0e-6;
%Delta_t=1.0e-7;
t=0:Delta_t:10.0;
% preallocating memory & set elements to zero
%x=zeros(1,numel(t));
x(1)=0.0;
tic % start timer
for n=1:length(t)-1
x(n+1)=x(n)+Delta_t*(1-x(n));
end
temp=toc; %end timer
fprintf(1,’It takes %e seconds to execute the Matlab program\n’,temp);