%
%  w03nonabs.m
%

%  initialize workspace & set some control variables
clear;
Nt = 50;  %  number of terms
Np = 16*Nt;  %  number of plot points

%  set x (row) vector (type "x" at the >>)
dx = pi/Np;  x = -pi+dx:dx:pi;

%  choose figure & clear (type "help hold")
figure(1);  subplot(2,1,2)
%clf;  hold on

%  compute series

yf = 0;
for j = 2:Nt
    yf = sin(j*x)/log(j);
end

plot(x,yf,'b')
axis([-pi pi -0.4 0.4])

%  !!! put some info on the plot !!!
title('\bf fourier approximations')
xlabel('\bf x-axis')
ylabel('\bf y(x)')