I am fairly new to APL and am struggling to multiply each element of a vector v by the vector in such a fashion that it returns an n x n square matrix where n is the length of the vector.
For example,
v ← 1 0 0 1.
I have attempted to create a function such as:
⍳⍴v{⍵×⍵[⍺]}v
1 4 9 16
I am failing to iterate the ioda through the vector, which is one part I need guidance on. My overall goal is to return a matrix:
v_1 x v --> 1 0 0 1
v_2 x v --> 0 0 0 0
v_3 x v --> 0 0 0 0
v_4 x v --> 1 0 0 1
I will keep trying to figure this out. Any help is appreciated, thanks!