12-03-2008 12:23 PM
I tried a few methods, and searched I just can't figure it out.
I'm trying to multiply an array by itself, and recieve the logical 2D array.
I tried a while loop and multplying each elemnt by a full row/colum then build array, doesn't work.
I tried a few others with initilize array and replace, shift register, converting to matrix and multiplying etc. just doesn't work.
any suggestions?
Solved! Go to Solution.
12-03-2008 12:29 PM - edited 12-03-2008 12:30 PM
Would this code do what you want? Try it out.
12-03-2008 12:34 PM - edited 12-03-2008 12:34 PM
12-03-2008 12:42 PM
Not really, if I have 1,2,3,4 and I'm multiplying it by itself (or rather it's transpose) I should get
1*1, 1*2, 1*3, 1*4
2*1, 2*2, 2*3, 2*4
3*1, 3*2, 3*3, 3*4
4*1, 4*2, 4*3, 4*4
12-03-2008 12:45 PM - edited 12-03-2008 12:46 PM
My fault. My linear algebra is not what it used to be I guess. Try this out...
12-03-2008 01:01 PM
Thanks!!!
I didn't know you can disable the indexing in the for loop, that's why I tried the while loop, rebuilding etc.
I am new...
🙂
12-03-2008 01:04 PM
12-03-2008 01:25 PM - edited 12-03-2008 01:27 PM
jmcbee wrote:
Well, the inner loop is not needed at all, so why clutter the diagram?
Also remember that we have the "outer product" in the "linear algebra" palette, most useful if you want a matrix datatype as result.
Here are a few variations:
12-03-2008 01:33 PM
12-03-2008 02:14 PM