%% lower and upper bounds of plot: lower<t<upper
lower=0.0;
upper=30.0;
%% end definition of lower and upper bounds
N=2000;
subinterval=(upper-lower)/N;
T_ARRAY=zeros(N+1:1);
F_ARRAY=zeros(N+1:1);
PI=3.1415;

for i=1:N+1
 T_ARRAY(i,1)=lower+(i-1.0)*subinterval;
end

for i=1:N+1
 T=T_ARRAY(i,1);
%% this function corresponds to the right hand side of problem
%% four, page 336 Boyce and DiPrima 9th edition.
%% befin function definition
 if (T<PI),
  F=sin(T);
 else
  F=sin(T)+sin(T-PI);
 end
%% end function definition
 F_ARRAY(i,1)=F;
end
plot(T_ARRAY,F_ARRAY)

