```
cvx_begin
variables alphas(noRelays) ;
X12_Bast = square_abs(alphas' * F1 *g2 )
%
%
cvx_end
```

where

```
Alphas=[a1 a2 a3] % variable to be optimized
```

And f1,g2 are complex column vectors of 3 elements and F1 is diagonal matrix

```
F1=diag(f1);
```

# I got the error:

Error using cvx/reshape (line 50)

To RESHAPE the number of elements must not change.

Error in geo_mean_cone (line 339)

xt( map(1,:), : ) == reshape( cone(1,1,:,:), [nm,nv] ); %#ok

Error in cvx/pow_cvx (line 208)

{ cat( nd, yt, ones(sz) ), cvx_accept_convex(xt) } == geo_mean_cone(

sw, nd, [1/pt,1-1/pt], ‘cabs’ ); %#ok

Error in cvx/pow_abs (line 13)

y = pow_cvx( x, p, ‘pow_abs’ );

Error in cvx/square_abs (line 6)

cvx_optval = pow_abs( x, 2 );

Error in Max_Min_optimize_Alphas_02 (line 50)

X12_Bast = square_abs(alphas’ * F1 *g2 )