Re: [Jprogramming] Creating random symmetric matrices

2012-08-21 Thread Bo Jacoby
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 standardGaussian distribution)? Note that 'A random symmetric matrix' is a contradiction in terms. A symmetric matri

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

[Jprogramming] Typo in http://www.jsoftware.com/help/dictionary/d522.htm

2012-08-21 Thread Peter B. Kessler
http://www.jsoftware.com/help/dictionary/d522.htm is the dictionary entry for {: (Tail). The title of the page is given in the HTML source as where it probably should say {: Tail It would be nice if it could be fixed, since I tend to have a lot of tabs up on various dictionary pages,

Re: [Jprogramming] gtk structures and J

2012-08-21 Thread bill lam
First you have to find out th size of that structure, then use mema to allocate that memory. Please refer to the chapter of dll of J user manual for detail of mema and related verbs. Втр, 21 Авг 2012, Emir Ustamujic писал(а): > Hi, in an earlier response from Bill I learned that j uses memr to ac

[Jprogramming] gtk structures and J

2012-08-21 Thread Emir Ustamujic
Hi, in an earlier response from Bill I learned that j uses memr to access structure members in gtk and that works fine. But I am wondering how we would go about creating new instances of gtk structures, for example what would be the J equivalent of : GdkColor color; Thanks, Emir ---

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

Re: [Jprogramming] Syntax checker for J

2012-08-21 Thread bill lam
I guess the line require 'grid' should also be placed inside conditional block. Пнд, 20 Авг 2012, Henry Rich писал(а): > Putting all that together, I come up with > > > if. IFJ6 do. IFGTK =. -. IFJHS =. IFCONSOLE end. > if. IFGTK *. -. IFJHS do. > code for grid > else. > code for no grid > en

Re: [Jprogramming] jal not updating

2012-08-21 Thread Ric Sherlock
Linda I'm not clear why you are prevented from installing in any other folder than Program Files, can you explain in a bit more detail what exactly you are installing and how, and what system you are installing on? I can say is that on my Windows 7 computer I've successfully tested installing to f

[Jprogramming] jal not updating

2012-08-21 Thread Linda Alvord
Both of Ric's suggestions have not worked. I am prevented from installing in any other folder at installation because the only permitted place is Program Files. I did not think it would be a good idea to move the folder after it was installed as I'm not sure what other changes would be necessa

Re: [Jprogramming] jal not updating

2012-08-21 Thread Ric Sherlock
Hi Linda, The J701a_setup.exe or J64-701a_setup.exe installers will *by default* install J into the "Program Files" folder. This is the same as doing a "System Install" using the minimal installers. If you install J into the "Program Files" folder then you will need to start J with Administrator p

Re: [Jprogramming] plot

2012-08-21 Thread Linda Alvord
I'm using Chrome. See William's Message Below. This was why I reinstalled J. It now forces J701 to be in program files and J701-user is in Owner. I did change the J701con to run as administrator but nothing happened. Plot is now good. I can't update jal. Linda -Original Message- F

Re: [Jprogramming] plot

2012-08-21 Thread bill lam
Thank you for the bug report, please locate the line load 'gui/android' or require 'gui/android' and delete/comment out the line as a temporary workaround. Втр, 21 Авг 2012, William Szuch писал(а): > Using j64-601 with Windows 7 > > After the latest update I get the following error when loading

[Jprogramming] plot

2012-08-21 Thread William Szuch
Using j64-601 with Windows 7 After the latest update I get the following error when loading plot: load 'plot' not found: C:\Users\Owner\j64-701\bin/gui/android/android |file name error: script | 0!:0 y[4!:55<'y' Regards Bill Szuch -