all, I've tried to find an answer to this question and have come across some related threads but nothing I was able to apply to my problem given my relative lack of experience in this arena.I basically have a constrained minimization problem using both inequality and equality constraints. I will have more variables (~10) than equality constraints (6), so generally speaking there will be an infinite number of solutions to the system. The wrinkle is that I want my solution vector to have as many zero elements as possible, or more precisely I want to minimize the number of non-zero elements. The real-world application is that each variable represents a trade in a portfolio, so I want to hit my targets in the portfolio with the fewest number of necessary trades.My initial approach was to use the fmincon function in Matlab with the objective function asfun=@(x)nnz(x);But this approach results in a spurious solution even for the most basic test example I could come up with. Is a problem like this solvable in Matlab? Any help would be much appreciated, I'm really at an impasse. Thanks.
How can I minimize the number of non-zero elements in the solution vector subject to linear constraints (MATLAB)?
matlab;constrained optimization;cvx