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
elevation"1 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, 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 =: (%&40) @ minRotationDistance
> timeToAscend =: (%&20) @ diff
>
> timeToMove =: (timeToRotate&: azimuth)>. (timeToAscend&: elevation)
>
> And here's the problem:
>
> ]left =. 3 2 $ i.6
> 0 1
> 2 3
> 4 5
>
> ]right =. 3 2 $ 3 + *: i.6
> 3 4
> 7 12
> 19 28
>
> left timeToMove right
> |domain error: diff
> | left timeToMove right
>
> left timeToMove"1 right
> 0.15 0.45 1.15
>
> It seems odd to me. I've checked it with b. 0 a couple of different ways, but
> none of the obvious permutations I've tried have result in any rank but
> infinite. I'd appreciate any help you can give!
>
> Thanks,
>
> —
> Daniel Lyons
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm