On 10/7/2010 6:53 PM, Abdullah wrote:
> hello people
>
> i would like to know how do i get my matrix into a diagonally dominant form, is there a certian
> script to re arrange my matrix?
>
> thank you
May be there is a command to do this.
But from definition:
http://math.nist.gov/MatrixMarket/glossary.html
"Diagonal Dominance
A matrix is diagonally dominant if the absolute value of each
diagonal element is greater than the sum of the absolute values of the
other elements in its row (or column)"
Then given a matrix A, you need to just find the max of each row's sum
and and each column's sum, and replace the diagonal element by the
corresponding maximum of the 2 sums:
Given A, this given B which is dominant diagonal matrix with respect to
A: (all elements of A remain in B, but the B diagonal is dominant now)
A=rand(3,3);
B=A;
B(eye(size(A))~=0)=0
z=max([sum(B,1)' sum(B,2)],[],2)
B(eye(size(B))~=0)=z
The above meets an >= not > as per definition, to force the greater
than, you can simply add some delta of your choosing, to each entry in z
before using it in the last statement above, or some multiple.
 example 
A =
0.2417 0.1320 0.5752
0.4039 0.9421 0.0598
0.0965 0.9561 0.2348
EDU>> B
B =
0.7072 0.1320 0.5752
0.4039 1.0881 0.0598
0.0965 0.9561 1.0526
Nasser
