ee=:(]%2) ?~@$
ee
0.5 ?~@$
ff=: 13 :'0.5 ?~x$y'
ff
0.5 [: ?~ $
5 ff 8
0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 1
0 0 0 0 1 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
J is so smart, it eliminate the need for *
hh=: 13 :' ?~x$y'
hh
[: ?~ $
]A=:5 hh 8
4 7 1 6 0 5 3 2
4 2 3 1 5 7 0 6
Linda, stick to integer arithmetic:
5 (0=[:?~#) 8
0 0 0 0 0 0 1 0
1 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 0 1 0 0
- Bo
Fra: Linda Alvord lindaalv...@verizon.net
Til: programm...@jsoftware.com
Sendt: 10:10 torsdag den 8. november 2012
Emne:
J has no explicit NA value. It is not simple to produce results like
you want because even with all numeric data that include missing
values, the missing values of NA are not numeric and complicate the
production of results. Numeric NA values can be represented with J _.
but this is very tricky
f=: 13 :'0=?~ x#y'
f
0 = [: ?~ #
Maybe someday I'll just write expressions like yours easily. The idea
seems so simple now.
However, I discovered this oddity:
3 3 3 +/ 4 4 4 4
7 7 7 7
7 7 7 7
7 7 7 7
3 3 3 ?/ 4 4 4 4
3 2 1
1 3 0
2 3 1
3 2 1
2 3 1
2 1 3
1 3 0
1 0 2
2 0
I would have expected a result with shape 2 3 4 not 2 4 3
Linda
-Original Message-
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Peter B.
Kessler
Sent: Thursday, November 08, 2012 9:24 PM
To: programm...@jsoftware.com
? b. 0
0 0 0
Therefore dyad ?/ is equivalent to ?0 _
The last axis comes from the shape of the individual results.
Henry Rich
On 11/8/2012 10:33 PM, Linda Alvord wrote:
I would have expected a result with shape 2 3 4 not 2 4 3
Linda
-Original Message-
From:
Purely a convenience thing, but using the verb freads rather than fread
will take care of the line-ending issue, by converting to the J standard of
LF-delimited lines. The verb fwrites will convert J line-endings to the
conventional line-ending for your current platform.
On Nov 8, 2012 12:34 PM,
Is it possible to have two or more plot windows open as is the case for
viewmat and grid ?.
Useful for comparing results in analysis.
Regards
Bill Szuch
--
For information about J forums see
Hi Bill!
Create two separate plot objects and use them:
p1=:''conew'jwplot'
p2=:''conew'jwplot'
plot__p1 i.10
plot__p2 i._10
Is this what you need
Esa
-Original Message-
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of