矩阵转置乘法

计算科学 矩阵 简历
2021-11-29 21:30:07

在 CVX 中,我遇到了一个问题。我想将 2x4 的矩阵与其转置相乘。我知道结果必须是肯定的。但是,它不能让我直接做乘法。说:有纪律的凸规划错误:在 CVX 中只能指定标量二次形式。我能做些什么?

cvx_begin variable power_allocation(length(anchor_coordinate.x),1) minimize sum(power_allocation) subject to Matrix = process_matrix_inv'*(observation_matrix(:,:,t*n+1)'*diag(power_allocation.*path_loss(:,t*n+1))* observation_matrix(:,:,t*n+1)+prior_infor(:,:,t*n))*process_matrix_inv; A = Matrix(1:2,3:6)*D*Matrix(1:2,3:6)'; trace_inv(Matrix(1:2,1:2)-A) <= MSE_limit; power_allocation <= power_max; power_allocation >= power_min; cvx_end

1个回答

在 CVX 中,您可以使用

quad_form(A*xb,Q)

实施

(Axb)TQ(Axb)

请参阅手册中有关标量二次形式的部分。