Really Simple Matrix Multiply Question

1 ビュー (過去 30 日間)
James 2011 年 12 月 3 日
A = [1,5,6,3,2,1] B = [3,4,6]
I want to take each element in A and multiple it by all the elements in B. For example I want C = [3,4,6,15,20,30,18,24...]
I know this is really simple, I'm just missing it in the hlep.
Thanks much,

回答 (2 件)

Grzegorz Knor
Grzegorz Knor 2011 年 12 月 3 日
Kronecker tensor product:

Paulo Silva
Paulo Silva 2011 年 12 月 3 日
Yet another possible solution
A = [1,5,6,3,2,1]
B = [3,4,6]


Community Treasure Hunt

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

Start Hunting!

Translated by