简体   繁体   English

成本函数-优化MATLAB

[英]cost function - optimization matlab

I have a signal X1 = [a1,...aN] where the values [a1,....,aN] are always >0 我有一个信号X1 = [a1,...aN] ,其中[a1,....,aN]的值始终> 0

I have other 599 signals X2, X3, ...,X600 of the same length (N) of X1 . 我还有X1的相同长度(N)的其他599个信号X2, X3, ...,X600 These signals could assume values >0 and <0. 这些信号可以假定值> 0和<0。

I know that the sum of all the 600 signals is always positive and equal to the signal S
S = X1 + X2 + ... + X600
我知道所有600个信号的总和始终为正且等于信号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)? 我想分配第一个信号X1以便以最佳方式减少其他信号的负值...您能建议我该怎么做(我使用matlab)?

In the best case S = X2' + X3' + ... + X600' where X2', X3' etc are positive signals. 在最佳情况下, S = X2' + X3' + ... + X600' ,其中X2', X3'等为正信号。

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): 似乎您想使(A)的以下目标(J)最小化:

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). 其中A是599 * N矩阵(优化变量)。

and 'negativehockeystick' is the function -min(x,0) 而“ negativehockeystick”是函数-min(x,0)

I think cvx can handle this problem as it looks convex (in A), but I am not sure 我认为cvx可以解决此问题,因为它看起来很凸(在A中),但我不确定

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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