Martin;

Many thanks to you and others that have provided the fine solutions to
my question. I have taken some time to go over the Dictionary examples
and hopefully have some better idea of what 'cut' is all about. This is
not to say that I fully understand cut's usage for all future
problems .. hopefully, I will understand better further down the line.

I have used cut many/several times earlier but usually in a more
simplistic situation. Cut like many other verbs can have such a variety
of faces, only a few of which are exposed in the Dictionary. 

Anyway, the help from you and the rest of the community on sorting out
my sometimes muddled thinking has been invaluable. Thanks again.

David

On Sun, 2008-09-14 at 16:00 +0000, [EMAIL PROTECTED] wrote:
> > If I am wrong and "cut" could be used please correct me.
> 
>       $ bigimage
> 5000 4000 3
> 
>       first =. {.@,           NB. first atom of any n-dim array
>       $  (10 10 1 ,: 1 1 1)  first;.3  bigimage
> 500 400 3
> 
> The left argument for the tesselation is (stride ,: sub-cube size).
> Since you want to sample down to the "first edgde atom", the size
> of the accessed sub-cube doesn't matter much.  The sample above
> selects only the corner (of shape 1 1 1).  The "first" processing
> instead of a naive "[" identity converts that from a rank-3 singleton
> cube into a scalar;  all those sample scalars combine back into a
> rank-3 image array.
> 
> The Dictionary entry for Cut has quite an abtract wording in order
> to cater for the general, rank-n case.  With your your specific
> application in mind, fill in values given above for x/y/u and work
> through those few sentences again.  That is, see how "|1{x" and other
> expressions used in the definition work out.
> 
>                                                       Martin
> 
> PS:  It would be nice hear which part of the Cut entry threw you
> off so far.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to