Thank you very much for your prompt response. I studied that document as well. The 1st command means its the beginning of cvx but in such a way that output will not be displayed on the screen during solution. The 2nd and 3rd lines mean these are variables of given sizes. The problem starts in 4th line i.e. in minimize(norm(y-x)). In this values of “y” are coming from MATLAB from which values of “x” are getting subtracted but “x” has got no values yet. So there starts my confusion. Further after subject to, What does [F, x; x’, lambda^2]>=0 do? Likewise what does

Ftmp = F(idxN1*M+1:idxN1*M+M, idxN2*M+1:idxN2*M+M); do?

These statements have increased my confusion and I didn’t find any help for these in that document there. Then I posted it here to understand it well as I am stuck because of this. Let me share the whole code:

close all; clear all; clc;

vec = @(MAT) MAT(:);

vecH = @(MAT) MAT(:).’;

% M = 5;

M = 10;

N = 4;

% N = 10;

d = 0.5;

K = 3;

SNR_dB = 20;

steerVecT = @(ang) exp(1j*2*pi*d*[0:M-1].‘*sin(vecH(ang)));*

steerVecR = @(ang) exp(1j2*pi*d*[0:N-1].’*sin(vecH(ang)));

angleGrid = [-80:1e-2:80].’;

steerGrid = steerMatTR(deg2rad(angleGrid), steerVecT, steerVecR);

rng(222);

targetAngle = [-30, 0, 40].’+rand(K, 1);

A = ones(K, 1);

steerM = steerMatTR(deg2rad(targetAngle), steerVecT, steerVecR);

r = steerM*A;

noiseVar = r’ * r / length® / db2pow(SNR_dB);

w = sqrt(noiseVar / 2) * (randn(size®) + 1j * randn(size®));

y = r+w;

lambda = 2*sqrt(M*N*log(M*N))*sqrt(noiseVar);*

cvx_begin sdp quiet

variable x(NM,1) complex

variable F(M*N,M*N) hermitian

minimize(norm(y-x))

subject to

[F, x; x’, lambda^2]>=0

for idxN1 = 0 : 1 : N-1

for idxN2 = 0 : 1 : N-1

Ftmp = F(idxN1*M+1:idxN1*M+M, idxN2*M+1:idxN2*M+M);

for delta = -(M-1) : 1 : M-1

if ((idxN1==idxN2) && (delta==0))

sum(diag(Ftmp, delta)) <= 1/N;

else

sum(diag(Ftmp, delta)) == 0;

end

end

end

end

cvx_end

spectrumANM = abs(x’*steerGrid).^2;

spectrumANM = spectrumANM/max(spectrumANM);

figure; plot(angleGrid, spectrumANM);

% User defined function

function steerM = steerMatTR(targetAngle, steerVecT, steerVecR)

steerA = steerVecT(targetAngle);

steerB = steerVecR(targetAngle);

steerM = zeros(size(steerA, 1)*size(steerB, 1), length(targetAngle));

for idxK = 1 : 1 : length(targetAngle)

steerM(:, idxK) = kron(steerB(:, idxK), steerA(:, idxK));

end