I have a 2*n array say X. I want another 2*2*n array where (:,:,i) = X(:,i)*transpose(X(:,i)). How to achieve it without using for loop.
I have tried using
i = 1:n;
then assigning
cov = (:,:,i) = X(:,i)*transpose(X(:,i));
but it is not working
Best Answer