function z = compute_kron_Ax(x, 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;

    X = reshape(x, D, M);
    X_temp1 = M * ifft(X, M, 2);
    X_temp2 = X_temp1(:, row_indices_M);

    temp_embed_N = zeros(N, Ms, 'like', x);
    temp_embed_N(1:D, :) = X_temp2;

    X_temp4 = fft(temp_embed_N, N, 1);
    X_temp5 = X_temp4(row_indices_N, :);

    Y = c .* X_temp5;
    z = Y(:); 
end