function g = compute_kron_Atx(r, params)

    M = params.M; N = params.N; D = params.D;
    Ms = params.Ms; Ns = params.Ns;
    row_indices_M = params.row_indices_M;
    row_indices_N = params.row_indices_N;
    c = params.c_vec;

    R = reshape(r, Ns, Ms);
    
    R_temp1 = conj(c) .* R;

    temp_embed_N = zeros(N, Ms, 'like', r);
    temp_embed_N(row_indices_N, :) = R_temp1;

    R_temp3 = N * ifft(temp_embed_N, N, 1);
    
    R_temp4 = R_temp3(1:D, :);
    
    R_temp4_T = R_temp4.';

    temp_embed_M = zeros(M, D, 'like', r);
    temp_embed_M(row_indices_M, :) = R_temp4_T;

    G_T = fft(temp_embed_M, M, 1);

    G = G_T.';

    g = G(:);
end