3D array multiplication with a 1D array

4 vues (au cours des 30 derniers jours)
Galgool
Galgool le 1 Oct 2019
Modifié(e) : Matt J le 1 Oct 2019
Hi,
Is there a way to multiply (element wise multiplication ) a 1-D array (of length 2) with a 3-D array?
A = (A1,A2)
M = ones(2,length(Fact2),length(Fact))
I have matlab R2014a .

Réponse acceptée

Matt J
Matt J le 1 Oct 2019
Modifié(e) : Matt J le 1 Oct 2019
If you cannot upgrade to R2016b, then
bsxfun(@times, A,M)

Plus de réponses (0)

Catégories

En savoir plus sur Desktop dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by