Re: [Jprogramming] Creating random symmetric matrices

2012-08-23 Thread Linda Alvord
software.com] On Behalf Of Linda Alvord Sent: Thursday, August 23, 2012 9:16 AM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Creating random symmetric matrices I just saw the advantage of the dyad definition. You can see where the variables are. Now my question is "Why wo

Re: [Jprogramming] Creating random symmetric matrices

2012-08-23 Thread Linda Alvord
om: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Linda Alvord Sent: Thursday, August 23, 2012 9:05 AM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Creating random symmetric matrices What is the advantage of a "dyad" definition?

Re: [Jprogramming] Creating random symmetric matrices

2012-08-23 Thread Linda Alvord
inal Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Ric Sherlock Sent: Thursday, August 23, 2012 6:50 AM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Creating random symmetric matrices I think your analogy i

Re: [Jprogramming] Creating random symmetric matrices

2012-08-23 Thread Henry Rich
By observing that triang@i. is the same as +/\@i. we could turn Ewart's gem into rsm =: (((>. |:)@(+/) { normalrand@({: + #)@]) +/\)@i. I'm not sure that's prettier; it uses the arcane ({: + #) to do the work of a single triang; but it might be a good form for a 'symmetric matrix of anything

Re: [Jprogramming] Creating random symmetric matrices

2012-08-23 Thread Ric Sherlock
---Original Message- > From: programming-boun...@forums.jsoftware.com > [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of bill lam > Sent: Thursday, August 23, 2012 6:10 AM > To: programm...@jsoftware.com > Subject: Re: [Jprogramming] Creating random symmetric matrices > > machine

Re: [Jprogramming] Creating random symmetric matrices

2012-08-23 Thread Linda Alvord
...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of bill lam Sent: Thursday, August 23, 2012 6:10 AM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Creating random symmetric matrices machine translation is [:-:]*>: while that from Shaw is -:@(*>:

Re: [Jprogramming] Creating random symmetric matrices

2012-08-23 Thread Ric Sherlock
of these two versions is optimal? > > Linda > > > -Original Message-ow > From: programming-boun...@forums.jsoftware.com > [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Ric Sherlock > Sent: Thursday, August 23, 2012 3:18 AM > To: programm...@jsoftware

Re: [Jprogramming] Creating random symmetric matrices

2012-08-23 Thread bill lam
...@forums.jsoftware.com] On Behalf Of Ric Sherlock > Sent: Thursday, August 23, 2012 3:18 AM > To: programm...@jsoftware.com > Subject: Re: [Jprogramming] Creating random symmetric matrices > > Hi Linda, > Basically tacit definitions contain no reference to their arguments. > htt

Re: [Jprogramming] Creating random symmetric matrices

2012-08-23 Thread Linda Alvord
inda -Original Message-ow From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Ric Sherlock Sent: Thursday, August 23, 2012 3:18 AM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Creating random symmetric matrices Hi Li

Re: [Jprogramming] Creating random symmetric matrices

2012-08-23 Thread Ric Sherlock
:programming-boun...@forums.jsoftware.com] On Behalf Of Ric Sherlock > Sent: Wednesday, August 22, 2012 9:36 PM > To: programm...@jsoftware.com > Subject: Re: [Jprogramming] Creating random symmetric matrices > > Just a pedantic nitpick with regard to terminology here. > Ewart

Re: [Jprogramming] Creating random symmetric matrices

2012-08-22 Thread bill lam
Behalf Of Ric Sherlock > Sent: Wednesday, August 22, 2012 9:36 PM > To: programm...@jsoftware.com > Subject: Re: [Jprogramming] Creating random symmetric matrices > > Just a pedantic nitpick with regard to terminology here. > Ewart's verbs were already tacit. I think the

Re: [Jprogramming] Creating random symmetric matrices

2012-08-22 Thread Linda Alvord
Behalf Of Ric Sherlock Sent: Wednesday, August 22, 2012 9:36 PM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Creating random symmetric matrices Just a pedantic nitpick with regard to terminology here. Ewart's verbs were already tacit. I think the key thing that your versions show i

Re: [Jprogramming] Creating random symmetric matrices

2012-08-22 Thread Ric Sherlock
; ([: >. [: |: i.) +/ [: tri i. > > Linda > > > -Original Message- > From: programming-boun...@forums.jsoftware.com > [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Henry Rich > Sent: Wednesday, August 22, 2012 6:46 PM > To: programm...@jsoftware.com > S

Re: [Jprogramming] Creating random symmetric matrices

2012-08-22 Thread Linda Alvord
gramming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Henry Rich Sent: Wednesday, August 22, 2012 6:46 PM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Creating random symmetric matrices Why yes, that's much better. Very clever way of filling

Re: [Jprogramming] Creating random symmetric matrices

2012-08-22 Thread Henry Rich
Why yes, that's much better. Very clever way of filling the triangle. Henry Rich On 8/22/2012 4:28 PM, Ric Sherlock wrote: Note that Ewart Shaw has responded to this on the Wiki with a solution that only generates the required number of random numbers: http://www.jsoftware.com/jwiki/EwartShaw/

Re: [Jprogramming] Creating random symmetric matrices

2012-08-22 Thread Ric Sherlock
Note that Ewart Shaw has responded to this on the Wiki with a solution that only generates the required number of random numbers: http://www.jsoftware.com/jwiki/EwartShaw/RandomSymmetricMatrix On Wed, Aug 22, 2012 at 5:30 PM, Ric Sherlock wrote: > The other option is not to add them in the first

Re: [Jprogramming] Creating random symmetric matrices

2012-08-21 Thread Bo Jacoby
lues and with random eigenvector basis? - Bo. > > Fra: Ric Sherlock >Til: programm...@jsoftware.com >Sendt: 7:30 onsdag den 22. august 2012 >Emne: Re: [Jprogramming] Creating random symmetric matrices > >The other option is not to add t

Re: [Jprogramming] Creating random symmetric matrices

2012-08-21 Thread Ric Sherlock
The other option is not to add them in the first place? load 'stats/distribs' (|: + ~: zeroTri ) >: zeroTri rnorm 5 5 0.346799 _1.221610.57274 0.556122 _0.329658 _1.22161 0.149955 _1.77435 _1.76668 0.831557 0.57274 _1.774350.77674 _0.0690683 _0.967551 0.556122 _1.76668 _0

Re: [Jprogramming] Creating random symmetric matrices

2012-08-21 Thread Owen Marschall
You read my mind. I was thinking about this same problem tonight while at the opera, and I couldn't think of any way to only divide the diagonals by sqrt(2) a second time--without loops, of course. I don't quite yet understand why your solution works, but I'm sure with enough staring and diction

Re: [Jprogramming] Creating random symmetric matrices

2012-08-21 Thread Henry Rich
If you have a matrix a of standard normal deviates, you can make it symmetric with asymm =: (+ |:) a but what is the variance of the items of a? The variance of values off the principal diagonal will be the sum of the variance of two independent standard normal deviates. i.e. 2. To return t

Re: [Jprogramming] Creating random symmetric matrices

2012-08-21 Thread Owen Marschall
Ah, just what I needed. Thanks! On Aug 21, 2012, at 1:06 PM, Ric Sherlock wrote: > The primitive ( |: ) is transpose. E.g. : > > |: i. 3 4 > 0 4 8 > 1 5 9 > 2 6 10 > 3 7 11 > On Aug 22, 2012 6:55 AM, "Owen Marschall" wrote: > >> Anyone know of an easy way to create a random symmetric matri

Re: [Jprogramming] Creating random symmetric matrices

2012-08-21 Thread Ric Sherlock
The primitive ( |: ) is transpose. E.g. : |: i. 3 4 0 4 8 1 5 9 2 6 10 3 7 11 On Aug 22, 2012 6:55 AM, "Owen Marschall" wrote: > Anyone know of an easy way to create a random symmetric matrix (more > specifically, a matrix whose entires are each picked from a standard > Gaussian distributio

[Jprogramming] Creating random symmetric matrices

2012-08-21 Thread Owen Marschall
Anyone know of an easy way to create a random symmetric matrix (more specifically, a matrix whose entires are each picked from a standard Gaussian distribution)? I can start by doing load 'stats' R=:normalrand N N but this is not symmetric, and I don't know of any way to symmetrize it without