# Mathematics of Signal Representations

## Math4355 - Spring 2013 - Homework

Assignment 4, due Thursday, February 14

• Review Sections 1.2.1, 1.2.3 up to Lemma 1.7 and 1.2.4.

• Matlab project
Write an m-file part_sum_fs.m in Matlab code which helps plot trigonometric polynomials of the form
y(t) = a_0 + a_1*cos(t)+ b_1*sin(t) + a_2*cos(2*t)+ b_2*sin(2*t) + ... + a_n*cos(n*t)+ b_n*sin(n*t)

The m-file (function) should be called as part_sum_fs(a,b,t) where the vectors containing the coefficients are
a=[a_0, a_1 ,..., a_n]
b=[b_1, b_2 ,..., b_n]
and the row vector t contains times at which y(t) is evaluated.

This should work for plotting y=1+2cos(t)+3sin(t)-sin(3t) on [0,4π]. To do this, we want to type
>>a = [1,2,0,0];
>>b = [3,0,-1];
>>t = linspace(0,4*pi,500);
>>y = part_sum_fs(a,b,t);
>>plot(t,y)
>>xlabel('t'), ylabel('y'), title('y=1+2cos(t)+3sin(t)-sin(3t)')

Include the plot and your m file in your homework. Also include plots for the trigonometric polynomials
y=sin(t)+sin(2t)/2+sin(3t)/3+sin(4t)/4
y=cos(t)+cos(3t)/32+cos(5t)/52

• Do Exercises p. 84-85: 12; 13; 21; 22.