Hey there, I am starting from scratch learning CVX at the moment. I wondered if you could show more work examples for non-differentiable optimisation problems. Here is my random example:
f = @(x) abs(x)
N = 128;
x = linspace(-1, 3, 200)’;
T = @(x) feval(chebpoly(0:N-1), x);
Tx = T(x);
fx=f(x);
cvx_begin
variable c(N)
minimize( norm( Tx * c - fx, 2 ) );
cvx_end
In my codes, I want to interpolate |x| with a Chebyshev series. However, because of a lack of understanding, the accuracy of my codes is very poor. Is there any way to improve it? Any CVX notes for non-differentiable optimisation problems? Would learn better with sample codes and illustrations. Thank you in advance.