bv_cvxbook_extra_exercises

# D a piecewise linear penalty 0 u 02 u 02 02

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

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: rational ﬁt to the exponential. (See exercise 6.9 of Convex Optimization.) We consider the speciﬁc problem instance with data ti = −3 + 6(i − 1)/(k − 1), yi = e t i , i = 1, . . . , k, where k = 201. (In other words, the data are obtained by uniformly sampling the exponential function over the interval [−3, 3].) Find a function of the form f ( t) = a 0 + a 1 t + a 2 t2 1 + b1 t + b2 t 2 that minimizes maxi=1,...,k |f (ti ) − yi |. (We require that 1 + b1 ti + b2 t2 > 0 for i = 1, . . . , k .) i Find optimal values of a0 , a1 , a2 , b1 , b2 , and give the optimal objective value, computed to an accuracy of 0.001. Plot the data and the optimal rational function ﬁt on the same plot. On a diﬀerent plot, give the ﬁtting error, i.e., f (ti ) − yi . Hint. You can use strcmp(cvx_status,’Solved’), after cvx_end, to check if a feasibility problem is feasible. 39 5.3 Approximation with trigonometric polynomials. Suppose y : R → R is a 2π -periodic function. We will approximate...
View Full Document

Ask a homework question - tutors are online