3D array multiplication with a 1D array

2 次查看(过去 30 天)
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 .

采纳的回答

Matt J
Matt J 2019-10-1
编辑:Matt J 2019-10-1
If you cannot upgrade to R2016b, then
bsxfun(@times, A,M)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Whos 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by