Creating a matrix from a dyadic product
There is a problem with vector multiplication in the second loop. You should transpose the second vector before doing multiplication.

F(:,:,t)= [Ax(i,j);Ay(i,j);Az(i,j)]*[Ax(i,j) Ay(i,j) Az(i,j)]';


One of the ways to speed things up is to apply vectorization instead of two for loops, such as with Dyadics.