    function nma_HW1(n)
    % HW1, problem 2. EECS 207A. UCI. Fall 2004
    % by Nasser Abbasi. Oct 12, 2004.
    
       x=[1.5 5.9 6.3 -0.6];
       fprintf('x\t\t\tf(x)\n');
       for(i=1:length(x))
           fprintf('%f,\t %f\n',x(i),f(x(i)));
       end
    end

    function sum=f(x)
    sum=0;
    for(k=1:1000)
        sum=sum+ ( sin((2*k-1)*x ) / (2*k-1) );
    end
    end
