http://www.mathworks.com/matlabcentral/newsreader/view_thread/250111
MATLAB Central Newsreader  diagonally dominant matrix
Feed for thread: diagonally dominant matrix
enus
©19942014 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Tue, 28 Apr 2009 16:11:02 +0000
diagonally dominant matrix
http://www.mathworks.com/matlabcentral/newsreader/view_thread/250111#645936
dew dropz
hi, i am new to matlab n i need a code to create a random diagonally dominant matrix

Tue, 28 Apr 2009 16:29:01 +0000
Re: diagonally dominant matrix
http://www.mathworks.com/matlabcentral/newsreader/view_thread/250111#645938
John D'Errico
"dew dropz" <dewdropz89@msn.com> wrote in message <gt79qm$ptn$1@fred.mathworks.com>...<br>
> hi, i am new to matlab n i need a code to create a random diagonally dominant matrix<br>
<br>
This will do it:<br>
<br>
eye(n)<br>
<br>
It is random, with however a rather narrow distribution<br>
on the elements. Or, perhaps you may consider it as<br>
random, just perhaps rather lucky.<br>
<br>
Unfortunately, your problem as posed is impossible<br>
to answer, at least without any knowledge of the<br>
desired distribution of the elements. <br>
<br>
John

Tue, 28 Apr 2009 16:32:03 +0000
Re: diagonally dominant matrix
http://www.mathworks.com/matlabcentral/newsreader/view_thread/250111#645940
Roger Stafford
"dew dropz" <dewdropz89@msn.com> wrote in message <gt79qm$ptn$1@fred.mathworks.com>...<br>
> hi, i am new to matlab n i need a code to create a random diagonally dominant matrix<br>
<br>
I suggest you read carefully the definition of a diagonally dominant matrix in for example:<br>
<br>
<a href="http://en.wikipedia.org/wiki/Diagonally_dominant_matrix">http://en.wikipedia.org/wiki/Diagonally_dominant_matrix</a><br>
<br>
and proceed from there. You should be able to make use of 'rand' or 'randn' to build up some kind of random matrix that adheres to these rules. Create the nondiagonals first and use their values to determine what constraints are to be placed on the random diagonal terms.<br>
<br>
Roger Stafford

Thu, 30 Apr 2009 11:45:45 +0000
Re: diagonally dominant matrix
http://www.mathworks.com/matlabcentral/newsreader/view_thread/250111#646374
dew dropz
"dew dropz" <dewdropz89@msn.com> wrote in message <gt79qm$ptn$1@fred.mathworks.com>...<br>
> hi, i am new to matlab n i need a code to create a random diagonally dominant matrix<br>
thx, buy the eye(n) is just an identity matrix, and rand gives decimals.<br>
i meant a random matrix with integers but has to be diagonally dominant

Thu, 30 Apr 2009 13:45:03 +0000
Re: diagonally dominant matrix
http://www.mathworks.com/matlabcentral/newsreader/view_thread/250111#646409
Stefan
<br>
Does this serve?<br>
<br>
z=round(1000*randn(5,5))<br>
z2=z+diag(sum(abs(z),2))<br>
<br>
, but I guess you would have learnt more by doing it yourself.<br>
<br>
Regards,<br>
Stefan<br>
<br>
"dew dropz" <dewdropz89@msn.com> wrote in message <gtc319$m35$1@fred.mathworks.com>...<br>
> "dew dropz" <dewdropz89@msn.com> wrote in message <gt79qm$ptn$1@fred.mathworks.com>...<br>
> > hi, i am new to matlab n i need a code to create a random diagonally dominant matrix<br>
> thx, buy the eye(n) is just an identity matrix, and rand gives decimals.<br>
> i meant a random matrix with integers but has to be diagonally dominant

Sun, 03 May 2009 21:21:02 +0000
Re: diagonally dominant matrix
http://www.mathworks.com/matlabcentral/newsreader/view_thread/250111#647028
jessica david
yes thanks<br>
<br>
<br>
"Stefan" <nospam@yahoo.com> wrote in message <gtca0v$7nb$1@fred.mathworks.com>...<br>
> <br>
> Does this serve?<br>
> <br>
> z=round(1000*randn(5,5))<br>
> z2=z+diag(sum(abs(z),2))<br>
> <br>
> , but I guess you would have learnt more by doing it yourself.<br>
> <br>
> Regards,<br>
> Stefan<br>
> <br>
> "dew dropz" <dewdropz89@msn.com> wrote in message <gtc319$m35$1@fred.mathworks.com>...<br>
> > "dew dropz" <dewdropz89@msn.com> wrote in message <gt79qm$ptn$1@fred.mathworks.com>...<br>
> > > hi, i am new to matlab n i need a code to create a random diagonally dominant matrix<br>
> > thx, buy the eye(n) is just an identity matrix, and rand gives decimals.<br>
> > i meant a random matrix with integers but has to be diagonally dominant