Matlab: Argmax and dot product for each row in a matrix

前端 未结 2 1712
春和景丽
春和景丽 2021-01-21 07:09

I have 2 matrices = X in R^(n*m) and W in R^(k*m) where k<. Let x_i be the i-th row of X and w_j be the

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-21 07:26

    Dot product is essentially matrix multiplication:

    [~, Y] = max(W*X');
    

提交回复
热议问题