简体   繁体   中英

cost function - optimization matlab

I have a signal X1 = [a1,...aN] where the values [a1,....,aN] are always >0

I have other 599 signals X2, X3, ...,X600 of the same length (N) of X1 . These signals could assume values >0 and <0.

I know that the sum of all the 600 signals is always positive and equal to the signal S
S = X1 + X2 + ... + X600
S
S = X1 + X2 + ... + X600

I would like to distribute the first signal X1 in order to reduce the negative values of the other signals in the best possible way...could you suggest me how to do that (I use matlab)?

In the best case S = X2' + X3' + ... + X600' where X2', X3' etc are positive signals.

Thanks

EDIT

% signal x1
x=rand(1,1000);
x(x<0)=0.01;

% signals x2,....,x599 contained in the rows of A
A=rand(599,1000);

It seems like you want to minimize the following objective (J) over (A):

J = sum( abs( x(:,1) - A*x(:,1)) ) +...
             sum(negativehockeystick( x(:, 2:end) + A.*x(:,1))

where A is an 599*N matrix (the variable of the optimization).

and 'negativehockeystick' is the function -min(x,0)

I think cvx can handle this problem as it looks convex (in A), but I am not sure

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM