Turning a product of two vectors into a matrix without using for loops?
1 view (last 30 days)
Star Strider on 8 Oct 2021
I believe something like this should do what you want —
x = 1:10
y = 11:20
M = x(:)*y
Using ‘x’ as x(:) forces it to become a column vector. The rest is straightforward vector-matrix multiplication.