CVX program for the matrix variable optimization - matlab

This question is about solving the problem on CVX using MATLAB:
My variable is W which is a N X N matrix. a is n X 1 vector. Sigma is a PSD matrix.
a) Can I solve this problem in Disciplined manner?
b) How to reformulate this in cvx since CVX says the Quadratic forms need to be with scalars. (equalities are matrix equalities).

Related

How to use matlab to solve the matrix equation expressed by symbols?

E,M,F,lambda,x are Matrix or vector. The equation is:
E*x+F+Transpose(M)*lambda=0;
M*x-gamma=0;
Transpose(lambda)*(M*x-gamma)=0
The solutions of X and lambda are
lambda=-(M*E^(-1)*Transpose(M))*(gamma+M*Transpose(E)*F)
x=-E^(-1)*(F+Transpose(M)*Transpose(lambda))
How can I use Matlab's symbolic operation to obtain the X and lambda solutions of the above matrix equation? I don't want to deduce the formula myself. I want Matlab to deduce the formula automatically.

unconstrained optimization with Laguerre polynomial

I have a matrix X and a distance matrix D={d_ij}. I have an optimization problem to be solved. The problem is:
Theta_i is the unkown vectors and L is the Laguerre polynomial.
How I can write this objective function in matlab in order to use fminunc.
Thank you

Solving linera equation AX=B in matlab

I have to solve following linear equation in Matlab
AX=B for X, where A - symetric positive definite upper triangular matrix (nxn), and B is matrix (mxn).
So far I have got code for solving such eqation where B is a vector. I have to change the code, to be able to calculate it for B as a (mxn) matrix
x(n)=b(n)/A(n,n);
for i=n-1: -1:1,
s=b(i);
for j=i+1:n,
s=s-A(i,j)*x(j);
end
x(i)=s/A(i,i);
end

nonlinear matrix equation solving in matlab

is it possible to solve below equation in matlab?
A*X+B*exp(X)=C
A, B are square and constant matrices. C is a constant and column matrix.
X is a column matrix which should be found.( exp() acts element by element on X).
If you are looking for a numeric method, you might want to try fsolve
X = fsolve( #(x) A*x + B*exp(x) - C, x0 );
Due to the non-linear nature of the problem you need to provide an initial guess x0 - the quality of which can affect the performance of the solver.

how to solve MMV sparse representation with CVX

I want to solve multiple measurement vector (MMV) sparse representation problem with CVX toolbox. I have a N*L matrix X. matrix X have only a few nonzero rows. I have system of equations Y=A*X. Y is M*L matrix of measurements (M
min Relax(X)
subject to Y=A*X
Realx(.) is a function that applies norm 1 to the vector t. (N*1)vector t consists of the norm 2 of each rows of matrix X. i.e. Relax(X)= norm_1(t) and t(i)=norm_2(X(i,:))
I can’t transform my objective function into a language that CVX can understand and solve.
Please tell me how I should change the problem objective and constraints that CVX could solve it.
'norms' is the cvx command you're looking for. Suppose sigma is some known parameter that allows Y to be only approximately equal to A*X (e.g. I tried it with sigma=10e-6). Then you could use this code:
cvx_begin separable
variable X(n,n)
minimize( norms(X,2,1) )
subject to
norm(Y - A*X,2)<= 10*sigma
cvx_end