enter image description here
I used the following code to solve this problem
%System parameters: N = 2; K = 8; M = 4; C_l=4; H = [0.1185 0.2811; 0.3550