F the current version of cvx handles the logarithm

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: y with the trigonometric polynomial K K bk sin(kt). ak cos(kt) + f ( t) = k=1 k=0 We consider two approximations: one that minimizes the L2 -norm of the error, defined as π f −y 2 = −π (f (t) − y (t))2 dt 1/2 , and one that minimizes the L1 -norm of the error, defined as π f −y 1 = −π |f (t) − y (t)| dt. The L2 approximation is of course given by the (truncated) Fourier expansion of y . To find an L1 approximation, we discretize t at 2N points, ti = −π + iπ/N, i = 1, . . . , 2N, and approximate the L1 norm as 2N f −y 1 ≈ (π/N ) i=1 | f ( ti ) − y ( ti ) | . (A standard rule of thumb is to take N at least 10 times larger than K .) The L1 approximation (or really, an approximation of the L1 approximation) can now be found using linear programming. We consider a specific case, where y is a 2π -periodic square-wave, defined for −π ≤ t ≤ π as y ( t) = 1 |t| ≤ π/2 0 otherwise. (The graph of y over a few cycles explains the name ‘square-wave’.) Find...
View Full Document

This note was uploaded on 09/10/2013 for the course C 231 taught by Professor F.borrelli during the Fall '13 term at University of California, Berkeley.

Ask a homework question - tutors are online