[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Broadcasting equivalent for multiplication?
From: |
Nir Krakauer |
Subject: |
Broadcasting equivalent for multiplication? |
Date: |
Wed, 1 May 2013 15:37:23 -0400 |
I have an n*m array X and an n*k array Y. Is there a shortcut to get
an n*m*k array Z such that
Z(:, i, j) is equal to X(:, i) .* Y(:, j) ?
The best I could come up with is
Z = repmat(X, [1 1 k]) .* permute(repmat(Y, [1 1 m]), [1 3 2]);
- Broadcasting equivalent for multiplication?,
Nir Krakauer <=