How can I do this L1 integral minimization?

Greetings,
I have the following integral
where kdx = [pi/16, pi/2], and
I want to minimize the integral above and solving corresponding a_j. But I have no clue how do to it. Can anyone give me some hint?
Thanks.

Antworten (2)

Bruno Luong
Bruno Luong am 29 Okt. 2018
Bearbeitet: Bruno Luong am 29 Okt. 2018

0 Stimmen

The problem of linear L1 fit (your case); meaning
argmin_x | M*x - y |_l1
argmin sum abs(M*x - y)
can be reformulated and solved by linear programming (opt toolbox required) using slack variables trick as following
n = length(y);
Aeq = [M speye(n) -speye(n)];
Aeqpr=nonzeros(Aeq);
beq = y(:);
c = [zeros(1,size(M,2)) ones(1,2*n)];
LB = [-inf(1,size(M,2)) zeros(1,2*n)];
UB = [];
c = c(:);
LB = LB(:);
UB = UB(:);
x0 = zeros(size(c)); % guess vector
[sol, f, exitflag] = linprog(c,[],[], Aeq, beq, LB, UB, x0);
x = sol(1:size(M,2));
You just need to build M with sin(k*j*dx) and log(dx).

8 Kommentare

Sijie Huang
Sijie Huang am 29 Okt. 2018
Bearbeitet: Sijie Huang am 29 Okt. 2018
Thanks for the reply. I am not sure about the one you said: build M with sin(k*j*dx) and log(dx).
I am thinking maybe do change of variable first, sth like y=ln(kdx), plug this into sin(jkdx), and then build the matrix?
Bruno Luong
Bruno Luong am 29 Okt. 2018
Bearbeitet: Bruno Luong am 29 Okt. 2018
I don't know the detail on how you compute the integral, but I imagine it comes down to be a sum of discrete points values times a step.
Write it down then you'll see how M(i,j) would be.
does this
linprog
contains the integral inherently?
Bruno Luong
Bruno Luong am 30 Okt. 2018
No.
Sijie Huang
Sijie Huang am 30 Okt. 2018
So you assume if the error inside the integral is minimum, the integral will be minimum?
Bruno Luong
Bruno Luong am 30 Okt. 2018
Bearbeitet: Bruno Luong am 30 Okt. 2018
???? Sorry I can't get your question.
I don't assume anything like that.
What I assume is this:
The integral is ~ | M*x - y |_l1.
It is up to you to find a matrix M and y to approximate the integral, the detail how to do that depends on (k*Deltax) which you know , not me.
Sijie Huang
Sijie Huang am 30 Okt. 2018
Oh, I see. Sorry I didn't understand your subscript _l1.
Bruno Luong
Bruno Luong am 30 Okt. 2018
Bearbeitet: Bruno Luong am 30 Okt. 2018
I don't know how to type a curly "l" (lowercase L), which is the right notation.

Melden Sie sich an, um zu kommentieren.

Kategorien

Gefragt:

am 29 Okt. 2018

Bearbeitet:

am 30 Okt. 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by