Hi Morten
I take it that your matrices are close to being orthonomal already.  Try
[Q, ~] = qr(A(:,:,i));
A(:,:,i) = Q;
which is about three times faster, not counting overhead to read and write to A(:,:,i).  The result is slightly different, but of course still orthogonal.



