I have been trying to think up a useful response here, but I just do not
know enough from this description to make good choices.
Typically, I build up the expressions that I find useful first and then
come up with names for them later. Sometimes I re-arrange things that work
so that they are
Raul,
On Fri, Nov 18, 2011 at 12:02:47PM -0500, Raul Miller wrote:
I have been trying to think up a useful response here, but I just do not
know enough from this description to make good choices.
Well, I appreciate the attempt. :) I don't know enough to know what
information would be necessary
I think that representative data, along with a description of the result
and purpose of the code would work. (Or, if not, that should be enough for
us to ask intelligent questions.)
--
Raul
On Fri, Nov 18, 2011 at 12:45 PM, Daniel Lyons fus...@storytotell.orgwrote:
Raul,
On Fri, Nov 18,
On Fri, Nov 18, 2011 at 12:49:55PM -0500, Raul Miller wrote:
I think that representative data, along with a description of the result
and purpose of the code would work. (Or, if not, that should be enough for
us to ask intelligent questions.)
I've been disinclined to share the problem because
Raul,
On Fri, Nov 18, 2011 at 03:53:07PM -0500, Raul Miller wrote:
Ok.. I hope we have not ruined anything here (to prevent people from
googling this and studying up ahead of time, it would be best if the
terminology were somewhat obfuscated). But, anyways...
I don't think it will be a
I did not see anything attached, but forgot about that before I was ready
to reply.
And here's an overview of how I treated angle differences:
degdif/~ 0 90 180 270 360
0 _90 _180 900
900 _90 _180 90
_180 900 _90 _180
_90 _180 900 _90
0 _90 _180 900
On Fri, Nov 18, 2011 at 04:34:24PM -0500, Raul Miller wrote:
I did not see anything attached, but forgot about that before I was ready
to reply.
It looks like the mailing list has stripped the attachments.
--
Daniel Lyons
--
In general, structuring J code is an exercise in picking the right words.
That said, in this case: adding 1 on a verb that assumes a rank 1
argument is only meaningful for verbs which do the right thing on equal
length arguments.
--
Raul
On Wed, Nov 16, 2011 at 11:36 PM, Daniel Lyons
I think that people very often misunderstand what they are doing when
setting/changing rank.
I very rarely see people set more than one number after the as in 1 and
on an occasion 0 1 and not realizing that you actually need three numbers
to set the ranks when the ranks are for a dyadic verb.
From the Vocabulary page on Rank un
The verb un applies u to each cell as specified by the rank n . The
full form of the rank used is 3$.|.n . For example, if n=:2 , the three
ranks are 2 2 2 , and if n=: 2 3, they are 3 2 3 .
On 11/17/2011 9:13 AM, Björn Helgason wrote:
I think that people
On Thu, Nov 17, 2011 at 09:49:32AM -0500, Raul Miller wrote:
In general, structuring J code is an exercise in picking the right words.
Well, in case you can help with that, here's my situation. For this
particular problem, I need to calculate a distance, so I have an
origin and a destination.
Since you know you want the function to applied with rank 1, you should
probably build it into the definition, e.g.
timeToMove=: ((timeToRotate : azimuth) . (timeToAscend :
elevation))1
left timeToMove right
0.15 0.45 1.15
On Tue, Nov 15, 2011 at 9:39 AM, Daniel Lyons
On Nov 16, 2011, at 8:49 AM, Devon McCormick wrote:
Since you know you want the function to applied with rank 1, you should
probably build it into the definition, e.g.
timeToMove=: ((timeToRotate : azimuth) . (timeToAscend :
elevation))1
left timeToMove right
0.15 0.45 1.15
I
I cannot duplicate your error. From your definitions I get
left timeToMove right
0.25 0.45
You might notice
left
0 1
2 3
4 5
elevation left
2 3
elevation1 left
1 3 5
Which do you want?
On 11/15/2011 1:08 AM, Daniel Lyons wrote:
I suspect this is a classic beginner misstep,
I cannot duplicate it either.
I suspect that a definition which is different from what was posted.
--
Raul
On Tue, Nov 15, 2011 at 7:27 AM, Kip Murray k...@math.uh.edu wrote:
I cannot duplicate your error. From your definitions I get
left timeToMove right
0.25 0.45
You might notice
On Nov 15, 2011, at 5:27 AM, Kip Murray wrote:
I cannot duplicate your error.
Trying it again this morning, I see I must have had a bad definition in my
session. Loading from the file I get the same behavior as you and Raul. Sorry
about that!
From your definitions I get
left
I suspect this is a classic beginner misstep, but I don't see what I'm doing
wrong.
I have a verb which doesn't work unless I use the rank-1 adverb. Here are the
definitions:
diff =: -`(-~) @.
azimuth =: 0 {::
elevation =: 1 {::
minRotationDistance =: - . : (360|) -~
timeToRotate =:
Dear J Forum:
I am applying +/ to arrays that can be of either rank 1 or rank 2. The
following approach works fine for rank 2:
+/ i. 2 5
5 7 9 11 13
But for a rank 1 array, I want just the array itself. I can do that with
+/_1:
+/_1 i. 5
0 1 2 3 4
However +/_1 i.2 5 collapses along
In validate.ijs find ismatrix. (Or change = to :)
ismatrix=: 2 = [EMAIL PROTECTED]
]`(+/)@.ismatrix i. 2 5
5 7 9 11 13
]`(+/)@.ismatrix i. 5
0 1 2 3 4
]`(+/)@.ismatrix 5
5
On Mon, 18 Feb 2008, Leigh J. Halliwell wrote:
+ Dear J Forum:
+
+ I am applying +/ to arrays that
Other possibilities:
+/_1@|:
+/@(,:^:([EMAIL PROTECTED]))
+/^:(1 [EMAIL PROTECTED])
FYI,
--
Raul
--
For information about J forums see http://www.jsoftware.com/forums.htm
Either of these:
+./1 i. 2 5
5 7 9 11 13
+./1 i. 5
0 1 2 3 4
dos=: ] ` (+/) @. (2=[:#$)
dos i. 5
0 1 2 3 4
dos i. 2 5
5 7 9 11 13
The latter is probably more efficient.
On 2/18/08, Leigh J. Halliwell [EMAIL PROTECTED] wrote:
Dear J Forum:
I am applying +/ to arrays that can
Rank 1 verbs treat rows as items.
Transpose turns columns into rows.
Adverse lets you try one thing and if that fails try the other.
So I suspect that this might work:
nfpt2 ::nfpt1 |: csvdata
--
Raul
--
For information
(reformatted the original)
Hi,
I have a question about composing functions. I have the following scenario.
1. I read in a csv file.
2. I split the array its constituent columns.
3. The columns are a mix of text and number data.
4. I wrote two verbs that gives me the nub, frequency, and
February 2008 10:56
To: Programming forum
Subject: RE: [Jprogramming] Rank Question
(reformatted the original)
Hi,
I have a question about composing functions. I have the
following scenario.
1. I read in a csv file.
2. I split the array its constituent columns.
3. The columns
I am not sure this is what you want but, for the
common parts of the two verbs I think you can use the
following.
(@#/.~) NB. for frequency
(#/.~ @% # ) NB. for %
+
+ nfpt=:([: 1 ~.) ,. ([: 0 #/.~) ,. [: 0 #/.~ % # NB. For Text
columns
+ nfpt2=:([: 0 ~.) ,. ([: 0 #/.~) ,. [: 0
25 matches
Mail list logo