From: Pr B on
i have a 1000x1000 upper triangular matrix (the main diagonal is all 0) and i want to place the values from the upper half in the corresponding entries in the lower half. i've been trying a'*a but that isn't working. i also tried a for loop method but that is giving me a matrix of all zeros when i do a(i,j) = a(j,i). anyone have a simple and elegant solution?
From: James Tursa on
"Pr B" <pb2297(a)columbia.edu> wrote in message <i2870n$jeq$1(a)fred.mathworks.com>...
> i have a 1000x1000 upper triangular matrix (the main diagonal is all 0) and i want to place the values from the upper half in the corresponding entries in the lower half. i've been trying a'*a but that isn't working. i also tried a for loop method but that is giving me a matrix of all zeros when i do a(i,j) = a(j,i). anyone have a simple and elegant solution?

a = a + a.';

James Tursa