I20a=: #: @ (2&^) @ i. @ -  which can be shortened to  [: #: 2 ^  i. @ -

was in the link I provided. Still longer.


R.E. Boss


> -----Oorspronkelijk bericht-----
> Van: [email protected] [mailto:programming-
> [email protected]] Namens Don Guinn
> Verzonden: dinsdag 24 augustus 2010 14:31
> Aan: Programming forum
> Onderwerp: Re: [Jprogramming] Creating a matrix (some polish required)
> 
> 
>    ([: #: 2 ^ i.)_4
> 1 0 0 0
> 0 1 0 0
> 0 0 1 0
> 0 0 0 1
> 
> 
> On Tue, Aug 24, 2010 at 7:23 AM, Alex Gian
> <[email protected]>wrote:
> 
> > Square it and you have a 35th way to make an identity matrix!  LOL.
> >
> >
> > On Tue, 2010-08-24 at 14:07 +0200, R.E. Boss wrote:
> > > ([: #: 2 ^ i.)4
> > > 0 0 0 1
> > > 0 0 1 0
> > > 0 1 0 0
> > > 1 0 0 0
> > >
> > > Is this one of the few(?) occasions where generating the 'anti
> identity'
> > is
> > > shorter than the main identity?
> > > c.f.
> > >
> >
> http://www.jsoftware.com/jwiki/Essays/Identity%20Matrix#BinaryRepresentati
> on
> > >
> > >
> > > R.E. Boss
> >
> >
> >
> >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> 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