function [Rate] = Rate_Calculation(gamma,A,K,M,N)
%UNTITLED3 Summary of this function goes here
%   Detailed explanation goes here
for k  = 1:K
    if isnumeric(A)
        Rate(k) = 0 ;
    else
        Rate(k) = cvx(0); 
    end
    for m = 1:M
        for n = 1:N
            Rate(k) = Rate(k) + A(n,k,m) * log2(1 + gamma(n,k,m));
        end
    end
    Rate(k) = (1/N) * Rate(k) ;
end

end

