ick wrote:
>
> I find histograms very useful and use them often.
>
> I think Roger's comment is correct: it's an old technique that reflects the
> limitations of an earlier time: http://en.wikipedia.org/wiki/Stemplot .
>
>
>> On Sat, May 3, 2014 at 10:17 A
Thank you, Brian, I hadn't seen your paper. A lot of hard work went into it!
Another example:
Noun hispct below shows by state the year 2000 percent of population that was
of Hispanic origin. For example, the percents for Alabama, Alaska, and Arizona
were
1.5, 4.1, and 25.3 . Outliers Califo
Your func2 is a "hook", see the diagram at
http://www.jsoftware.com/docs/help801/dictionary/dictf.htm
You may also need to understand the dyadic case of m&v , see
http://www.jsoftware.com/docs/help801/dictionary/d630n.htm
--Kip Murray
Sent from my iPad
> On Apr 30, 2014, at 10:42 AM, Jon Houg
Noun ruth below shows the numbers of home runs of Babe Ruth in each of his 15
years with the New York Yankees, 1920 to 1934. Noun stemplot is a "stemplot"
(defined below) of this data. I have a clumsy way of producing noun stemplot.
How would you do it?
ruth
54 59 35 41 46 25 47 60
(r90&.>)^:(i.3) < mat
+-+---+-+
|0 1 2|3 0|5 4 3|
|3 4 5|4 1|2 1 0|
| |5 2| |
+-+---+-+
--Kip Murray
Sent from my iPad
> On Apr 22, 2014, at 10:20 AM, "Francesco Pedulla'" wrote:
>
> Hello everybody,
> I am using J801 under Ubuntu. Here is a behaviour I do not unders
I think I would pay for k's database capability. --Kip Murray
Sent from my iPad
> On Apr 8, 2014, at 12:46 PM, Björn Helgason wrote:
>
> I would take a look at the mapped file database lab to get ideas.
>
> -
> Björn Helgason
> gsm:6985532
> skype:gosiminn
>> On 8.4.2014 15:34, "Raul Miller"
I use
steps
{.@] + -~/@] * [ %~ [: i. >:@[
5 steps 2 3
2 2.2 2.4 2.6 2.8 3
--Kip Murray
Sent from my iPad
> On Mar 21, 2014, at 9:29 AM, Pascal Jasmin wrote:
>
> an alternate approach to increasing step size is:
>
>2 ([ * [: i. ]) 5
> 0 2 4 6 8
>
> - Original Message -
Chris, I am unable to post to the General Forum.
I have just downloaded J801 and can run jqt
JVERSION
Engine: j701/2011-01-10/11:25
Library: 8.01.025
Qt IDE: 1.0.24/4.8.5
Platform: Win 32
Installer: j801 install
InstallPath: c:/users/kip murray/j801
I need step-by-step instructions for running
Have a look at the diagrams for Hook and Fork in
http://www.jsoftware.com/docs/help801/dictionary/dictf.htm
--Kip Murray
Sent from my iPad
> On Mar 18, 2014, at 2:15 PM, Pascal Jasmin wrote:
>
> to be clear, I am in no way asking for how to double a product.
>
> what the function is actually
Look at the small denominators in Roger's first way (here slightly modified):
how do your denominators compare?
vv =: 2 1 , [: , 1 ,.~ 1 ,.~ 2 + 2 * i.
]v =: vv 3x
2 1 2 1 1 4 1 1 6 1 1
,. (+%)/\ v
2
3
8r3
11r4
19r7
87r32
106r39
The rational 2721r1001 approximates e to six, almost seven decimal places:
0j7 ": (^ 1) ,: 2721r1001
2.7182818
2.7182817
I got 2721r1001 from a continued fraction. How would you look for rational
approximations to e ?
--Kip Murray
Sent from my iPad
A suggestion: where do the understood parentheses go in 4&*y and in 4*&y ?
--Kip
Sent from my iPad
> On Mar 8, 2014, at 10:33 PM, "Linda Alvord" wrote:
>
> Why is the display of f different than g , h and I ?
>
>
>
>NB. m&v y is defined as m v y
>
>
>
> NB. u&n y is
Yike Lu,
The following describes material provided in the standard library. If you type
one of the names in a J session, you will see how the name is defined. Notice,
the address says j801 (you use j701 below).
http://www.jsoftware.com/docs/help801/user/lib_stdlib.htm
About "In theory, this
P.S. 801 not j801 in third line
Sent from my iPad
> On Feb 28, 2014, at 11:56 AM, km wrote:
>
> Yike Lu,
>
> The following describes material provided in the standard library. If you
> type one of the names in a J session, you will see how the name is defined.
> Not
(*"0 1 =@i.@#) 1 2 3
1 0 0
0 2 0
0 0 3
--Kip Murray
Sent from my iPad
> On Feb 26, 2014, at 9:35 PM, Roger Hui wrote:
>
> diag=: 3 : 'y (,&.>~i.#y)} 0 $~ ,~#y'
> diag 10 20 30 40
> 10 0 0 0
> 0 20 0 0
> 0 0 30 0
> 0 0 0 40
>
> diag1=: ]\ * =/~@i.@#
> diag1 10 20 30 40
Linda, here's a pretty good Newton's method adverb:
newt =: 1 : 0
t =. y
h =. 1 % 512
whilst. t ~: s do.
s =. t
t =. s - +: h * (u s) % (u s + h) - u s - h
h =. h % 2
end.
t
)
(2 - *:) newt 1 NB. function on left, first root guess on right
1.414213562
--Kip
Sent from my i
idea is that if tk is the linear fractional transformation ak
% bk + ]
then the nth term is b0 + t1 t2 ... tn 0 . ("term" is defined below)
--Kip Murray
Sent from my iPad
> On Feb 23, 2014, at 4:17 PM, km wrote:
>
> The generalized continued fra
Floating point digits beyond the 17th are illusory on my 32-bit machine:
0j42 ": x:^:_1 [ 5r3
1.666740681534975010436028242111
Can use _1 x: y for x:^_1 y
0j42 ": _1 x: 5r3
1.666740681534975010436028242111
--Kip
Sent from my iPad
> On Feb 23, 2014, at 11:
Linda, does this help?
9!:10 ''
13
_1 x: 5r3
1.6667
--Kip
Sent from my iPad
> On Feb 23, 2014, at 7:41 PM, "Linda Alvord" wrote:
>
> I just saw that there are several other ways to get the golden ration.
> Before I look at them I don't know how to change the rational numbers
> Gauss, 1812, according to C.D. Olds, Continued Fractions, MAA, 1963.
>
>
>
>
> On Sun, Feb 23, 2014 at 3:55 PM, Roger Hui wrote:
>
>> +`%/ and +`%/\ are the expressions you seek. For example:
>>
>> +`%/3,20$4 6
>> 3.60555
>> %: 13
>>
The generalized continued fraction
b0 + a1
-
b1 + a2
-
b2 + a3
b3 + ...
is the infinite sequence
b0 , b0 + a1%b1 , b0 + a1%b1 + a2%b2 , b0 + a1%b1 + a2%b2 + a3%b3 ,
Very interesting, Linda. 1.61803 looks familiar, but I can't quite recognize
it. No, it's not
^.5
1.60944
--Kip Murray
Sent from my iPad
> On Feb 23, 2014, at 2:16 AM, "Linda Alvord" wrote:
>
> ]A=:>:i.8
>
> 1 2 3 4 5 6 7 8
>
> +/A
>
> 36
>
> A+/A
>
> 2 3 4 5 6 7 8 9
Here is a hint:
% 1 +. (+%)/\ 10 $ 1x
1 1 2 3 5 8 13 21 34 55
--Kip Murray
Sent from my iPad
> On Feb 20, 2014, at 2:42 PM, Roger Hui wrote:
>
> % 1 +. (+%)/\ 100 $ 1x
> --
> For information about J forums see http://www.j
Henry, experiments with 3!:3 make me guess <0$0 as a correct definition of a:
but I have no clue how to define verb test. --Kip Murray
Sent from my iPad
> On Feb 15, 2014, at 11:28 AM, Henry Rich wrote:
>
> The Dictionary defines a: as <$0, but in fact the two are not interchangeable.
>
> Th
You can do
(_1 + 2 %~/\ ]) 4 5 3
0.25 _0.4
which uses Insert / and Infix \
--Kip Murray
Sent from my iPad
> On Feb 17, 2014, at 5:30 AM, Joe Bogner wrote:
>
> From the J in 5 minutes thread, I'm starting to build my example
>
> In my example, I'm working with stock prices. One of the
>]page1 =: 1 2 , 3 4 ,: 5 6
> 1 2
> 3 4
> 5 6
>]page2 =: 2 * page1
> 2 4
> 6 8
> 10 12
>]book1 =: page1 ,: page2
> 1 2
> 3 4
> 5 6
>
> 2 4
> 6 8
> 10 12
>]book2 =: page2 ,: page2
> 2 4
> 6 8
> 10 12
>
> 2 4
> 6 8
> 10 12
>
>]library =: book1 ,: book2
>
I have installed J801 and modified my j701jhs icon so it calls up JHS801.
Evidence
J Http Server
i.2
0 1
Updating server catalog...
JVERSION
Engine: j701/2011-01-10/11:25
Library: 8.01.020
Platform: Win 32
Installer: j801 install
InstallPath: c:/users/kip murray/j801
BUT NOT MANY 'ORDINARY'
This is a test to see whether I can reach the programming forum. ==Kip Murray
Sent from my iPad
--
For information about J forums see http://www.jsoftware.com/forums.htm
An important consideration is, "clarity for who"? I want the code to be clear
to me when I come back to it later. For that reason I usually code explicitly,
calling explicit helper verbs, although many of the lines are "tacit in
spirit". Suggestive names help.
--Kip Murray
Sent from my iPad
ftware.com] On Behalf Of Raul Miller
> Sent: Monday, January 13, 2014 12:53 AM
> To: Programming forum
> Subject: Re: [Jprogramming] Tacit?
>
> FF=: [`({.@[)`]}
>
> Or something using multiple and add with some bit valued intermediate
> results.
>
> Thanks,
>
OK, I looked up Amend } in the vocabulary and saw how to do it with a gerund
argument! --Kip
Sent from my iPad
> On Jan 12, 2014, at 11:39 PM, km wrote:
>
> Here is a simpler question. Is there a tacit version of ff below?
>
> u =: 2 3 0
> v =: i. 3 3
> ff =: 4
lf this code is handling joining ragged lists.
>> NB. Is there a better way?
>>
>> saveAA =: 3 3 $ 2 1 4 _4 _1 _11 2 4 _2
>> lu saveAA
>>
>> 1 0 0
>> _2 1 0
>> 1 3 1
>>
>> 2 1 4
>> 0 1 _3
>> 0 0 3
>>
&
Verb LU below produces the matrices L and U of the LU decomposition of a square
matrix A. L is lower triangular, U is upper triangular, and A is L +/ . * U .
Should one attempt a tacit version?
eye =: =@i.@] NB. eye 3 is a 3 by 3 identity matrix
rop =: 3 : 0 NB. row op: subtract c times row
stop changing, because the iteration number
> always changes. t also changes. Yuck.
>
> Henry Rich
>
>
>> On 12/22/2013 3:27 AM, km wrote:
>> Thanks, Raul, for a cool solution. I'm still interested in tacitly
>> terminating a series when its partial sums
40)&p.) 0j1p1
> 1
>
> I'd just use ^
>
> --
> Raul
>
>> On Sat, Dec 21, 2013 at 5:43 PM, km wrote:
>> Verb exp below uses the series for monadic ^ to calculate ^ y . Can
>> you remind me how to do exp tacitly? You may omit the "c
Verb exp below uses the series for monadic ^ to calculate ^ y . Can you
remind me how to do exp tacitly? You may omit the "clean" part. Verb
clean replaces tiny real numbers by 0 .
clean =: (* *!.1e_14@|)"0&.+.
exp =: 3 : 0
os =. 0
s =. 1
k =. 0
t =. 1
while. s
My problem is not with complex numbers but with the verb 'en' which works
>> with any single vector. but if you give it 2 -2D vectors (i.e complex
>> numbers) it treats the components of the two vectors (say 1j2 , 4j10) as if
>> they are a single 4D vector.
>>
s.jsoftware.com
>>> [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Aai
>>> Sent: 16. joulukuuta 2013 14:42
>>> To: programm...@jsoftware.com
>>> Subject: Re: [Jprogramming] Length of a vector
>>>
>>> |@j./"1 yy
>>
j_0.785398
>>]RC=: % C
>> 0.5j_0.5 _0.5j_0.5 _0.5j0.5 0.5j0.5
>>^. RC
>> _0.346574j_0.785398 _0.346574j_2.35619 _0.346574j2.35619 _0.346574j0.785398
>>Linda
>>
>> From: programming-boun...@forums.jsoftware.com
>> [mailto:programmi
0.346574j_2.35619 0.346574j_0.785398
>
> ]RC=: % C
> 0.5j_0.5 _0.5j_0.5 _0.5j0.5 0.5j0.5
>
> ^. RC
> _0.346574j_0.785398 _0.346574j_2.35619 _0.346574j2.35619 _0.346574j0.785398
>
> Linda
>
> From: programming-boun...@forums.jsoftware.com
> [mailto:programming-boun...@f
ite:
>
>^.@%@(+/&.:*:)
>
> or even:
>
>^.@(+/&.:(*: :. (^&_0.5) ) )
>
> But I'm not sure what this buys us.
>
> -Original Message-
> From: programming-boun...@forums.jsoftware.com
> [mailto:programming-boun...@forums.jsoftware.com] On Behalf
Dan, I haven't been following this thread, but know that minus the logarithm of
a positive number is the logarithm of the reciprocal. Is that relevant?
^. 1r4 1r2 1 2 4
_1.38629 _0.693147 0 0.693147 1.38629
--Kip
Sent from my iPad
> On Dec 16, 2013, at 3:42 PM, Dan Bron wrote:
>
> Raul
is square root of sum of squares of absolute
values of components.)
--Kip
Sent from my iPad
> On Dec 16, 2013, at 6:42 AM, Aai wrote:
>
> |@j./"1 yy
> 5 13
> 17 25
>
>
>> On 16-12-13 04:38, km wrote:
>> This is an easy one, but let's see what you
mming-boun...@forums.jsoftware.com] On Behalf Of Ganesh Rapolu
> Sent: Sunday, December 15, 2013 10:54 PM
> To: programm...@jsoftware.com
> Subject: Re: [Jprogramming] Length of a vector
>
> en =. +/"1&.:*:
>
>
>> On Sun, Dec 15, 2013 at 5:38 PM, km wrote:
>&
This is an easy one, but let's see what you come up with.
The Euclidian norm or length of a vector is the square root of the sum of the
squares of its components. Write verb en below. It should be able to find
the length of a vector of any number of components.
]yy =: 2 2 2 $ 3 4 5 12 8
- ^. | j./ 1 1
_0.346574
--Kip Murray
Sent from my iPad
> On Dec 10, 2013, at 9:03 AM, Marshall Lochbaum wrote:
>
> -@^.@|@j./"1 does the trick.
>
> You can also use (+/&.:*:) in place of |@j./ , leaving you with
> -@^.@(+/&.:*:)"1
> .
>
> Marshall
>
>> On Tue, Dec 10, 2013 at 09:55:22AM
Accidentally sent this only to Sebastiano.
Sent from my iPad
Begin forwarded message:
> From: km
> Date: December 8, 2013 at 3:10:25 PM CST
> To: Sebastiano Tronto
> Subject: Re: [Jprogramming] Puzzle
>
> Thanks to all for their contributions. I admired Dan Bron's clo
Figure out what verb p3sp does and write it. The name is a hint. Extra credit
for not using
https://oeis.org/
--Kip Murray
p3sp i. 7
30 105 385 1001 2431 4199 7429
Sent from my iPad
--
For information about J forums see ht
Brian, it is possible for a set to be an element of another set. set <'' with
no space between the quotes is the set whose only element is '' , the empty
set. (Again no space between the quotes). This is analogous to set <2 being
the set whose only element is the number 2 . --Kip
Sent fro
I get
set NB. Argument y should be a box or list of boxes
[: /:~ ~.
set 0;1
+-+-+
|0|1|
+-+-+
set <0
+-+
|0|
+-+
set <'' NB. no space between quotes
++
||
++
set <' ' NB. space between quotes
+-+
| |
+-+
Also
'' -: set '' NB. No space between quotes in either pair of them
1
i. 2 ^ [: # >) ([: < #)"1 >
> ps4
> [: set"0 ([: |: [: |. [: |: [: #: [: i. 2 ^ [: # >) ([: < #)"1 >
>
> Did you ever get the pdf file? I'm still trying to make the empty set be
> the same size as the set with a 1 in it.
>
> Linda
Well, I'm going to give up the enclosing box for my sets. The displays are too
complicated.
Please try to "break" the revised proposal below. You can save it and do a
loadd.
Thanks. --Kip Murray
NB. SETS PROPOSAL
NB. INTRODUCTION
NB. A set is '' or a sorted list of boxes,
(set 1;2); On Nov 17, 2013, at 8:40 PM, Henry Rich wrote:
>
> It looks to me that ps adds an extra level of boxing. Check the result of
> ps set ;:'a b'
> to see if I'm wrong.
>> On 11/17/2013 9:19 PM, km wrote:
>> Will you try to "break
Will you try to "break" the following proposal before I post it on the J Wike?
Thanks,
-- Kip Murray
NB. J SETS PROPOSAL
NB. This ia a script you can copy and save, then load or loadd.
NB. INTRODUCTION
NB. Part of each set is its enclosing box. Like a Venn diagram set.
NB. A set is a box
┘│
> └───┴───┴───┴───┴───┴───┴───┴───┘
> A
> 123
> $A
> 4
>
> I can’t explain how this happens! Any ideas?
>
>
> psla set
> ┌─┬─┐
> │┌───┐│┌───┐│
> ││┌─┐│││┌─┐││
> │││ │1│││
> ││└─┘│││└─┘││
> │└───┘│└───┘│
> └─┴─┘
> A
> 123
23│1 │1 3│12 │123│││
> ││L│││L│││L│││L│││L│││L│││L│││L││
> │L--│L--│L--│L--│L--│L--│L--│L--│
> L---+---+---+---+---+---+---+----
>
> Linda
>
> -Original Me
Focus on what you want to DO. You want to do "the square root of the mean of
the square".
A novice's tip for using [: is to read [: f g as "the f of the g" . What you
want is
[: %: ( [: (+/%#) *: )
which you read as "the square root of ( the mean of the square )" . (Omitted
one "
The third shaded paragraph tells how to do a while loop with ^:
--Kip Murray
Sent from my iPad
> On Nov 16, 2013, at 4:34 PM, Pascal Jasmin wrote:
>
> I do.
>
> ^: either applies to y if v returns true, or returns y.
>
> what I want is to stop application once v u y is true, and return the l
n -: mn~NB. Equality; important since sets are not sorted
>
>
> R.E. Boss
>
> (Add your info to http://www.jsoftware.com/jwiki/Community/Demographics )
>
>> -Original Message-
>> From: programming-boun...@forums.jsoftware.com [mailto:programming-
>>
ets, while, eg, nub is not? Sorting in sets seems primarily an
>> algorithmic not mathematical issue.
>
> greg
> ~krsnadas.org
>
> --
>
> from: km via forums.jsoftware.com
> to: "programm...@jsoftware.com"
> date: 16 November 2013 12:00
> subject: Re
finition of a set is
> _unordered_...?
>
> greg
> ~krsnadas.org
>
> --
>
> from: km
> to: "programm...@jsoftware.com"
> date: 16 November 2013 08:57
> subject: Re: [Jprogramming] Power
s )
>
>
>
>> -Original Message-
>
>> From: programming-boun...@forums.jsoftware.com [mailto:programming-
>
>> boun...@forums.jsoftware.com] On Behalf Of km
>
>> Sent: zaterdag 16 november 2013 8:13
>
>> To: programm...@jsoftware.com
>
>
The following script for doing sets in J is a big improvement over what I
proposed several years ago. You can save it and then do a loadd. I would like
to make it a J Wiki page, but it will take a while to relearn how to do that.
Near the end is my verb ps for creating power sets and another
t; ┌─┬─┬─┬─┬─┬─┬─┬─┐
> │┌───┐│┌───┐│┌───┐│┌───┐│┌───┐│┌───┐│┌───┐│┌───┐│
> ││ │││ C│││ B │││ BC│││A │││A C│││AB │││ABC││
> │└───┘│└───┘│└───┘│└───┘│└───┘│└───┘│└───┘│└───┘│
> └─┴─┴─┴─┴─┴─┴─┴─────┘
>
> Linda
>
>
> -Original Message-
> From: programmi
t; │││┌─┐│┌─┐│┌─┬─┐│┌─┐│┌─┬─┐│┌─┬─┐│┌─┬─┬─┐││
> C│││B│││B│C│││A│││A│C│││A│B│││A│B│C│││
> │││└─┘│└─┘│└─┴─┘│└─┘│└─┴─┘│└─┴─┘│└─┴─┴─┘││
> │└┴───┴───┴─┴───┴─┴─┴───┘│
> └┘
>
>
>
>
>
> -Original Message-
T---┐
> │ │ C│ B │ BC│A │A C│AB │ABC│
> L---+---+---+---+---+---+---+
>
> This is a set of the subsets? I haven't looked at your example yet.
>
> Linda
>
>
> -Original Message-
> From: programming-boun...@forums.jsoftware.com
> [mailto:programming-boun...@foru
#)&.>
>
> --
> Raul
>
>
>> On Thu, Nov 14, 2013 at 3:17 PM, km wrote:
>> Here is my latest attempt at sets in J. Would anyone care to write a verb
>> ps (power set) such that ps y is the set of all subsets of set y? It's
>> called the po
---+---+
>
>
> R.E. Boss
>
> (Add your info to http://www.jsoftware.com/jwiki/Community/Demographics )
>
>> -Original Message-
>> From: programming-boun...@forums.jsoftware.com [mailto:programming-
>> boun...@forums.jsoftware.com] On Behalf Of km
>> Sent: donderdag 1
Here is my latest attempt at sets in J. Would anyone care to write a verb ps
(power set) such that ps y is the set of all subsets of set y? It's called the
power set in part because when a set has n elements its power set has 2^n
elements. --Kip Murray
NB. A set is a box with a sorted lis
phics )
>
>
>> -Original Message-
>> From: programming-boun...@forums.jsoftware.com [mailto:programming-
>> boun...@forums.jsoftware.com] On Behalf Of km
>> Sent: woensdag 13 november 2013 20:25
>> To: programm...@jsoftware.com
>> Subject: [Jprogramming] Finding el
Think of ss below as a list of four sets; elements are in the inner boxes.
Verb si gives the index of the first set in which an element is found. Your
task is to write verb si .
]ss =: (<0);(1;2);(3;4;5);< 6;7;8;9
+---+-+---+-+
|+-+|+-+-+|+-+-+-+|+-+-+-+-+|
||0|||1|2|||3
gt;
>]dd =: ^ 0j1 * o. i. 2 2
>(_10+10+])&.:j.dd
> 1 _1
> 1 _1
>
>
>
>
>
>
> Den 20:15 fredag den 8. november 2013 skrev km :
>
> That was quick! --Kip
>>
>> Sent from my iPad
>>
>>> On No
That was quick! --Kip
Sent from my iPad
> On Nov 8, 2013, at 1:04 PM, Henry Rich wrote:
>
> clean =. (* (2^_44) < |)&.:+.
> clean =. (* *@:|)&.:+.
>
> Henry Rich
>
>> On 11/8/2013 1:36 PM, km wrote:
>> If the absolute value of a real
If the absolute value of a real or imaginary part is < 2_44 then verb clean
replaces the part by 0.
Write verb clean.
]dd =: ^ 0j1 * o. i. 2 2
1 _1j1.22465e_16
1j_2.44929e_16 _1j3.67394e_16
clean dd
1 _1
1 _1
0j1 * dd
0j1 _1.22465e_16j_1
2.44929
See if the following helps. Adverb table is in the z locale. --Kip
table
1 : (':'; '(((#~LF-.@e.])5!:5<''u'');,.y),.({.;}.)":x,y u/x')~
1 2 3 * table 3 4
+-++
|*|3 4|
+-++
|1|3 4|
|2|6 8|
|3|9 12|
+-++
Sent from my iPad
> On Nov 6, 2013, at 10:07 PM, "Linda Alvor
See the documentation for Index Of i.
http://www.jsoftware.com/docs/help701/dictionary/didot.htm
1 2 3 4 i. 3 _3 NB. 1 2 3 4 index of 3 is 2; _3 not found
2 4
--Kip Murray
Sent from my iPad
> On Nov 5, 2013, at 8:18 AM, Joe Bogner wrote:
>
> I'm experimenting with Agenda and building a v
>
> The result above is what I want. But…
>
> f=: 13 :'(,>{.y)x,>}.y'
> a f d
> |domain error: f
> | a f d
> |[-8] c:\users\owner\j801-user\temp\94.ijs
>
> Is there a way to get that result? Linda
>
>
> -Original Message---
4│ 16 12 8 4 0 _4 _8 _12 _16│
> └──┴─┘
>
> over
> ({. ; }.)@":@,
> over2
> [: ({. ; }.) [: ": ,
>
>
>
> by
> ' *'&;@,.@[ ,. ]
> by2
> ] ,.~ [: ' *'&; [: ,. [
>
> Raul’s is st
1 0 1 2 3 4│
> ├──┼─┤
> │ 4│_16 _12 _8 _4 0 4 8 12 16│
> │ 3│_12 _9 _6 _3 0 3 6 9 12│
> │ 2│ _8 _6 _4 _2 0 2 4 6 8│
> │ 1│ _4 _3 _2 _1 0 1 2 3 4│
> │ 0│ 0 0 0 0 0 0 0 0 0│
> │_1│ 4 3 2 1 0 _1 _2 _3 _
6 4 2 0 _2 _4 _6 _8│
>> │_3│ 12 9 6 3 0 _3 _6 _9 _12│
>> │_4│ 16 12 8 4 0 _4 _8 _12 _16│
>> └──┴─┘
>>
>> Linda
>>
>> -Originaforl Message-
>> From: programming-boun...@forums.jsoftware.com
>> [mailto:programming-bou
─┘
>
> Linda
>
> -Originaforl Message-
> From: programming-boun...@forums.jsoftware.com
> [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of km
> Sent: Saturday, November 02, 2013 10:43 AM
> To: programm...@jsoftware.com
> Subj
Perhaps you can find a way to use Format ":
--Kip Murray
Sent from my iPad
> On Nov 2, 2013, at 9:17 AM, "Linda Alvord" wrote:
>
> I better do it myself. (I may call for help...) Thanks for the offer. Linda
>
> -Original Message-
> From: programming-boun...@forums.jsoftware.com
> [
Does this help?
ff =: * 1&|.
ff 2 3 4
6 12 8
2 3 4 * 3 4 2
6 12 8
--Kip Murray
Sent from my iPad
> On Oct 25, 2013, at 10:36 PM, Don Kelly wrote:
>
> I have written a couple of explicit verbs for Y-delta network transforms and
> would like advice on how to express the
Here's a clumsy one that works.
f =: %`0:@.(0=])"0
f i. 2 5
01 0.5 0.33 0.25
0.2 0.17 0.1428570.125 0.11
f 0
0
f 3j4
0.12j_0.16
--Kip Murray
Sent from my iPad
> On Oct 11, 2013, at 6:49 AM, Raul Miller wrote:
>
> You did not provide a def
I had a teacher who would not say "x and y are equal" because the plural "are"
implies they are NOT equal. He would say "If x is a number and y is a number
..." rather then "If x and y are numbers ... " when he wanted to allow the
possibility that x is y. Some of us saw that by enforcing this
Thanks, that works!
Sent from my iPad
> On Oct 5, 2013, at 11:40 AM, Eric Iverson wrote:
>
> You could do:
> loadd ''
>
>
>> On Sat, Oct 5, 2013 at 5:54 AM, km wrote:
>> Is it possible to do a "run display" of the file in the iPad edi
This seems to do it.
<"1,./><"0&.> a
+-+-+-+
|+-+-+|+-+-+|+-+-+|
||0|a|||1|b|||2|c||
|+-+-+|+-+-+|+-+-+|
+-+-+-+
doit =: [: <"1 [: ,./ [: > <"0&.>
doit a
+-+-+-+
|+-+-+|+-+-+|+-+-+|
||0|a|||1|b|||2|c||
|+-+-+|+-+-+|+-+-+|
+-+-+---
NB. Responding to a request from Raul in Jbeta
NB. A cool use of eigen values and vectors -- recursion
NB. Preliminaries
clean =: * *@| NB. numbers with 2^_44 > | are replaced by 0
mp =: +/ . * NB. matrix product
NB. below, square matrix x to integer power y
mpwr =: ( 4 : 'x mp^:y =i.#x'
Is it possible to do a "run display" of the file in the iPad edit window?
IFIPAD
1
VERSION
1.3 5
--Kip Murray
Sent from my iPad
--
For information about J forums see http://www.jsoftware.com/forums.htm
Verb mpwr calculates matrix powers . Is there a tacit way?
mp =: +/ . * NB. matrix product
mpwr =: 4 : 'x mp^:y =i.#x' NB. square matrix x to integer power y
A =: 1 1 ,: 1 0
A
1 1
1 0
A mpwr 3
3 2
2 1
A mp A mp A
3 2
2 1
A mpwr _1
0 1
1 _1
A mp A mpwr _1
1
Paste multiple lines into a file or the scratch area, then run the file or
scratch area. --Kip Murray
Sent from my iPad
> On Oct 3, 2013, at 10:50 AM, Jan-Pieter Jacobs
> wrote:
>
> Looks really nice.
>
> In the last example, there's a dot missing after NB. , making it
> non-copy-pastable .
rent approach, with
> a different set of tradeoffs.)
>
> FYI,
>
> --
> Raul
>
>> On Wed, Oct 2, 2013 at 2:32 AM, km wrote:
>> J displays <1 2 and , <1 2 identically -- you can't tell from the display
>> that the first is a scalar and the sec
Here is a small improvement on utility bi
bi =: (<"_1)`('scalar ',":)@.(''-:$)
NB. box items of non-scalar arrays
--Kip Murray
Sent from my iPad
> On Oct 2, 2013, at 1:32 AM, km wrote:
>
> J displays <1 2 and , <1 2 identically -- you can'
J displays <1 2 and , <1 2 identically -- you can't tell from the display that
the first is a scalar and the second is a one-element list. The utility bi
below boxes the items of non-scalars but displays scalars the way J does.
Experiment with this utility. Try bi i. 3 2 4 and bi <1 2 and
bi
It is correct and better!
--Kip Murray
Sent from my iPad
> On Sep 23, 2013, at 6:00 PM, Henry Rich wrote:
>
> ratio =: [: %~/ [: (>./ - <./) [: +. ,
>
> untested
>
> Henry Rich
>
>> On 9/23/2013 6:16 PM, km wrote:
>> Verb ratio calculates (max
3' plot data NB. Shows the square as a square
--Kip Murray
Sent from my iPad
> On Sep 21, 2013, at 10:14 AM, km wrote:
>
> I hope the following simpler example will clarify. Notes explain what the
> ratio is.
>
> data1 =: _1 0j_1 1 0j1 _1 ,: _2 _1 0 1 2
The current challenge is to write the verb ratio illustrated in the Sep 21
note. --Kip Murray
Sent from my iPad
> On Sep 21, 2013, at 10:14 AM, km wrote:
>
> I hope the following simpler example will clarify. Notes explain what the
> ratio is.
>
> data1 =: _1 0j_1
It parses as (g@[)&0 . See the description of x u&n y (the dyadic use of
bond) in
http://www.jsoftware.com/docs/help701/dictionary/d630n.htm
Sent from my iPad
> On Sep 21, 2013, at 8:24 AM, Alex Giannakopoulos
> wrote:
>
>> On 20 September 2013 13:02, Henry Rich wrote:
>>
>> g@[&0
>
>
arded?
>
> Thanks,
>
> --
> Raul
>
>> On Sat, Sep 21, 2013 at 8:38 AM, km wrote:
>> Challenge: devise a verb ratio so that if
>>
>>data1 =: ((,-)2j1) ,: _1^(%~i:)60
>>data2 =: _1^(%~i:)60
>>
>> then
>>
>>ratio data
ar.
--Kip Murray
Sent from my iPad
> On Sep 21, 2013, at 4:08 AM, km wrote:
>
> Try
>
>'aspect 0.5' plot ((,-)2j1) ,: _1^(%~i:)60
>
> and
>
>'aspect 1' plot _1^(%~i:)60
>
> --Kip Murray
>
> Sent from my iPad
>
>
1 - 100 of 314 matches
Mail list logo