My objective is Beam_d, and stvmat is always a known vector (with complex numbers). What I want to find are the optimum weights in w
The following code seems to do the trick somehow; probably there are more advanced optimization options. The optimized weights output weights_o I would like it to be a complex value, as the weights can be expressed as an amplitude and a phase. In fact I would like to be able to restrict the output for example to only phase or only amplitude weights, but I have no clue on how to tackle this optimization. Could anyone provide some hints?
objfun = @(w)norm(w'*stvmat-Beam_d);
weights_i = ones(N,1);
weights_o = fmincon(objfun,weights_i,,,,,zeros(N,1),ones(N,1));