Produce a matrix with 2 vectors

1 次查看(过去 30 天)
Hi, I can't wrap my head around finding the simplest solution for this problem.
I have two vectors
A=[1 2 3] and B=[1;1;2] I want to produce the matrix
C=[1 2 3;1 2 3;2 4 6]
I am certain there is an easy command could I be reminded please !
N.
P.S. there are bonus points if the commands works to produce an N=A*B dimension matrix with 2 matrices of A and B dimensions

采纳的回答

j dr
j dr 2013-4-4
Just figured out B*A works... Sorry for wasting everyone's time !

更多回答(1 个)

j dr
j dr 2013-4-4
But that does not work with matrices...

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by