On Thu, 2010-02-18 at 18:19 -0500, Devon McCormick wrote:
> I still "cheat" by using "13 :" a lot,
Yeah, I'm often tempted to use it too, now that I've learnt it, but an
even better 'cheat' is to ask here...
> For further thought, why is this OK
>
> 14 */@(-i.) 3 2
> 1680 1287
>
> but I get this error here?
>
> 14 */@(-i.) i. 14
> |limit error
> | 14 */@(-i.)i.14
No idea. I'm trying to understand the code, but still haven't groked
what youre trying to do (or why the answer isn't '2814 182', as I'd have
guessed)
But from messing around with it, I see that any arguments after the
'first' y specify the dimensions of a matrix, e.g
*/ 14 dec 2 3 4
28 13 0 _11
_20 _27 _32 _35
_36 _35 _32 _27
*/ 14 dec 2 3 4 5 will give you a 3x4x5 matrix!
I think that makes it pretty obvious why using i.14 failed, although in
my case I got an 'out of memory' error. You must have a lot of memory
on your system ;)
(Still can't quite understand what '14 */@(-i.) 3 2' is trying to do,
though - 13 : '14 */@(-i.) 3 2' gives
154 130 108"_
Huh??!
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm