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" <omarschal...@amherst.edu> 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 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 thinking in loops, which I'm training myself not to. If I could
>> somehow take a transpose, that would solve the problem, but I don't know
>> how to do that either.
>> 
>> Thanks,
>> Owen
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to